question

Bijian Wu avatar image
Bijian Wu asked

PlayFabMultiplayerAgentAPI.OnSessionConfigUpdateEvent in Unity Game Engine

I am using Unity to develop my multiplayer game, and I am using the Multiplayer server and Multiplayer Matchmaking you provided.

when integrating Server SDK to my Unity project.

I Notice the following event OnSessionConfigUpdateEvent.

Should I poll the Session ID from the OnSessionConfigUpdateEvent when clients called GetMatch and Server is allocated? is this the best place to get session ID from? is the Session ID same as the MatchID?

Code Snippets:

PlayFabMultiplayerAgentAPI.OnSessionConfigUpdateEvent += OnSessionConfigUpdate;

private void OnSessionConfigUpdate(SessionConfig sessionConfig) { Debug.Log("On Session Config Update called"); Debug.Log("Session id is " + sessionConfig.SessionId); }

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Citrus Yan avatar image
Citrus Yan answered

Assuming that you would want to Integrate Matchmaking with PlayFab Multiplayer Servers as discussed in this section: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/matchmaking/multiplayer-servers#information-passed-to-the-game-server. In that case, yes, the Session Id is the same as the Match Id, and the Matchmaking system will write such information into the config file so that you can retrieve it later. And, please note that such info is only available after the server allocation, you’ll be able to retrieve it once readyForPlayers returns true, for more details, please check out this section: https://docs.microsoft.com/en-us/gaming/playfab/features/multiplayer/servers/integrating-game-servers-with-gsdk#getting-configuration-settings-within-your-game-server

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.