Unity PUN auto disconnects on scene change
Options
Hello all, i know this question should have been asked a few times here. However my issue wasnt solved no matter which solved solution i followed.
My Unity version is 5.5.0f3 and PUN is v1.87
I am calling (PhotonNetwork.automaticallySyncScene = true;) for every player on Start() before calling (PhotonNetwork.LoadLevel("scenename");) on MasterClient
What i figured:
-using DontDestroyOnLoad on a gameObject that has PhotonView will cause a duplicate error upon scene change
-calling PhotonNetwork.isMessageQueueRunning = false isnt necessary because PhotonNetwork.LoadLevel() settles it
Why does my players automatically disconnect from the room?
My Unity version is 5.5.0f3 and PUN is v1.87
I am calling (PhotonNetwork.automaticallySyncScene = true;) for every player on Start() before calling (PhotonNetwork.LoadLevel("scenename");) on MasterClient
Sending RPC "DoStartGame" to target: All or player:.This is my current log. Upon changing scene both the players will automatically no longer be in the same room.
Received RPC: DoStartGame
PUN-instantiated 'GameManager' got destroyed by engine. This is OK when loading levels. Otherwise use: PhotonNetwork.Destroy().
Registered PhotonView: 2
OperationResponse 252: ReturnCode: 0.
OperationResponse 254: ReturnCode: 0.
OnStatusChanged: Disconnect current State: DisconnectingFromGameserver
OnStatusChanged: Connect current State: ConnectingToMasterserver
Connected to masterserver.
OnStatusChanged: EncryptionEstablished current State: Authenticating
OnEvent: Event 226.
OperationResponse 230: ReturnCode: 0.
RPCs can only be sent in rooms. Call of "DoSetGameReady" gets executed locally only, if at all.
What i figured:
-using DontDestroyOnLoad on a gameObject that has PhotonView will cause a duplicate error upon scene change
-calling PhotonNetwork.isMessageQueueRunning = false isnt necessary because PhotonNetwork.LoadLevel() settles it
Why does my players automatically disconnect from the room?
1