How to detect disconnect to Master server
Options
In my project, I have registered callback in OnFailedToConnectToPhoton , OnDisconnectedFromPhoton and OnConnectionFail so that it can detect user disconnect network or Photon server.
However sometimes player encounter ( or manually occur by connect to NameServer)
JoinRandomRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster
without above disconnection callback triggered.
How can I get the callback of disconnect to master server?
However sometimes player encounter ( or manually occur by connect to NameServer)
JoinRandomRoom failed. Client is not on Master Server or not yet ready to call operations. Wait for callback: OnJoinedLobby or OnConnectedToMaster
without above disconnection callback triggered.
How can I get the callback of disconnect to master server?
0
Comments
-
The callback to detect on discconect from master server is
public override void OnDisconnected(DisconnectCause cause) {}
After you disconnect you must reconnect back to the Photon servers using..PotonNetwork.ConnectUsingSettings();
..in order to invokePhotonNetwork.JoinRandomRoom();
0 -
I cannot find OnDisconnected(DisconnectCause cause) in my PunBehaviour class.
I am using PUN classic0