Installation
You can copy the Assets/PlayFabSdk folder into your Unity project. After that, you need to enable the scripting directiveENABLE_PLAYFABSERVER_API on your Unity Build settings (example).
Alternatively, you can use the provided Unity package file.
You can find sample code in the MultiplayerServerSample project.
Usage
At a minimum, you need to implementPlayFabMultiplayerAgentAPI.Start() method and start a coroutine for the PlayFabMultiplayerAgentAPI.ReadyForPlayers() method, like in the code below
PlayFabMultiplayerAgentAPI.OnServerActiveCallback, like in the example below:
For more information regarding game server states, check Basics of a PlayFab game server section here
PlayFabMultiplayerAgentAPI.OnMaintenanceCallbacktriggered when Azure needs to perform maintenance on the VMPlayFabMultiplayerAgentAPI.OnShutDownCallbacktriggered when a termination notification is receivedPlayFabMultiplayerAgentAPI.OnAgentErrorCallbacktriggered if there’s any error between game server and PlayFab VM Agent communication
For more GSDK samples, you can take a look at our MPS Samples repository here
