This guide covers the package-specific prerequisites and first setup steps for PlayFab Party and PlayFab Multiplayer on Win64 and Xbox.
This SDK already bundles Multiplayer and Party under PlayFabAPI/; the steps below are tailored to this package and only cover Win64 and Xbox.
| Requirement | Notes |
|---|---|
| PlayFab title | Create or select a title in PlayFab Game Manager and keep the Title ID available. |
| PlayFab Unity SDK installed | Install microsoft.playfab.sdk through Unity Package Manager. |
| GDK 2604 or later | Required for the current Win64 and Xbox package scope. |
| Unity 6 | Package metadata targets Unity 6000.0 or later. |
| Win64 build target | For Windows standalone builds, use the 64-bit Windows target. |
| GDK binaries selected | Use PlayFab > Change GDK after package import or GDK updates. |
| PlayFab login flow | Multiplayer and Party operations require an authenticated PFPlayerEntity. |
On Windows/GDK, initialize XGameRuntime before any PlayFab API and uninitialize it only after PlayFab cleanup has completed.
PlayFab Party provides networking, voice chat, text chat, transcription, and translation APIs. Before using it:
- Enable the Party feature for your PlayFab title.
- Confirm your title can log in through the SDK and produce a
PFPlayerEntity. - Add the
PlayFabMultiplayerManagerprefab fromPlayFabAPI/PlayFabPartySDK/Prefabs/PlayFabMultiplayerManager.prefabto your scene, or instantiate it before callingPlayFabMultiplayerManager.Get(). - For Xbox/GDK builds that use Xbox Live authentication, configure the Xbox app title in Partner Center, sandbox, and development Xbox Live accounts.
- Install and configure the Unity GDK and GDK Tools packages when using XUser authentication or Xbox builds.
The prefab is included in the package at PlayFabAPI/PlayFabPartySDK/Prefabs/PlayFabMultiplayerManager.prefab.
- Initialize XGameRuntime on Windows/GDK.
- Call
PFServices.Initialize(). - Create a
PFServiceConfigwithPFCore.CreateServiceConfig(). - Log in and keep the returned
PFPlayerEntity. - Add or instantiate
PlayFabMultiplayerManagerfromPlayFabAPI/PlayFabPartySDK/Prefabs/PlayFabMultiplayerManager.prefab. - Call
PlayFabMultiplayerManager.Get()and subscribe toOnErrorand network events needed by your game. - Call
SetPlayer(playerEntity)before Party network operations. - Create a Party network or join one by Network ID. Hosts typically share the Network ID through PlayFab Lobby, matchmaking, or another title-managed channel.
- Use the manager APIs for voice, chat, and data messages.
- Leave the network, dispose PlayFab handles, and then uninitialize PlayFab and XGameRuntime.
Example manager setup:
using PlayFab.Party;
using UnityEngine;
PlayFabMultiplayerManager manager = PlayFabMultiplayerManager.Get();
if (manager == null)
{
Debug.LogError("Add the PlayFabMultiplayerManager prefab to the scene before using Party.");
return;
}
manager.OnError += OnPartyError;
manager.SetPlayer(playerEntity);The importable PlayFab Party sample demonstrates manager setup, player registration, network creation, chat messages, data messages, and cleanup.
PlayFab Multiplayer provides lobby and matchmaking APIs. Before using it:
- Confirm your title can log in through the SDK and produce a
PFPlayerEntity. - Confirm GDK binaries are selected with PlayFab > Change GDK.
- For Xbox builds, complete the required GDK and Xbox project setup for your title.
The old standalone plugin required a PlayfabMultiplayerEventProcessor prefab. In this package, PlayfabMultiplayerEventProcessor is a component available under PlayFab.Multiplayer; you can add it to a scene or create it at runtime.
- Initialize XGameRuntime on Windows/GDK.
- Call
PFServices.Initialize(). - Create a
PFServiceConfigwithPFCore.CreateServiceConfig(). - Log in and keep the returned
PFPlayerEntity. - Add a
PlayfabMultiplayerEventProcessorand set itsPlayFabTitleID, or manually callPlayFabMultiplayer.Initialize(titleId)and process lobby and matchmaking state changes every frame. - Register Multiplayer event handlers before starting operations. Lobby and matchmaking APIs are event-driven.
- Call Multiplayer APIs such as
CreateAndJoinLobby,FindLobbies, or matchmaking ticket APIs. - Leave or disconnect lobbies, uninitialize Multiplayer, dispose PlayFab handles, and then uninitialize PlayFab and XGameRuntime.
Example event processor setup:
using PlayFab.Multiplayer;
using UnityEngine;
var processorObject = new GameObject("PlayFabMultiplayerEventProcessor");
var processor = processorObject.AddComponent<PlayfabMultiplayerEventProcessor>();
processor.PlayFabTitleID = TitleId;The importable PlayFab Multiplayer sample demonstrates this flow and bridges event callbacks to async/await with TaskCompletionSource.
| Platform | Notes |
|---|---|
| Win64 | Use 64-bit Windows builds. XUser login requires the Unity GDK package; Custom ID login is useful for development and samples. |
| Xbox | Requires GDK setup, Xbox configuration, and XUser/Xbox Live authentication for Xbox scenarios. |