Hi Team,
How to detect member leave party when crash game? I'm using PlayFabMultiPlayer SDK. I'm call "LeaveLobby" in OnApplicationQuit and OnDestroy but not success.
Hi Team,
How to detect member leave party when crash game? I'm using PlayFabMultiPlayer SDK. I'm call "LeaveLobby" in OnApplicationQuit and OnDestroy but not success.
The OnApplicationQuit(called when quit the application) and OnDestroy(called when destroy game objects) method may not be called when a unity application crash, so, the “LeaveLobby” method will not be executed. Since we are not expert in Unity, you may consider consulting with Unity support to see if there has any specific unity method will be called when a unity application crash and call the “LeaveLobby” method. Also, the “Leave Lobby” method in PlayFabMultiPlayer SDK should be something like this: “LobbyEntity.Leave(localuser);”. You could refer to https://community.playfab.com/questions/144560/get-lobby.html to have more information.
In addition, since an event named PlayFabMultiplayer.OnLobbyUpdated (https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/lobby/unity-multiplayer-api-reference/playfab.multiplayer/playfabmultiplayer/onlobbyupdated) is raised when a lobby member disconnects, which can indicate which player's connection status has changed. You can then use the GetMemberConnectionStatus (https://learn.microsoft.com/en-us/gaming/playfab/features/multiplayer/lobby/unity-multiplayer-api-reference/playfab.multiplayer/lobby/getmemberconnectionstatus) method to detect if the player is disconnected.
2 People are following this question.