How players on the same team are in different scene?

Options

I have two players in a reward scene and one of the client players wants to go back to the lobby, what should I do? Because the two scenes are inconsistent, causing problems with client player movement

Answers

  • At the end of the game, say in your reward scene, call PhotonNetwork.LeaveRoom() and then when a player clicks the "back to menu" button, you can call UnityEngine.SceneManagement.SceneManager.LoadSceneAsync() to return to the lobby. Calling LeaveRoom connects the client to the MasterServer instead of the GameServer, which makes the client no longer sync scenes with the players in the room (if you are using lobbies you would need to call JoinLobby in your menu scene).