Client Disconnect with message “Peer Created” - PUN

Options
I am developing multiplayer game in unity using Photon Unity Network plugin. At present, I have completed half of my game. Today I am facing new issue regarding connection of client.

Initially it connects with room but after sometime it automatically disconnected from server and this is happening for every client that was exist in room.
GUILayout.Label(PhotonNetwork.connectionStateDetailed.ToString());

Above statement display Peer Created message on screen and after that
void OnConnectionFail()
{
    Debug.Log("OnConnectionFail");
}

method gets called.

So what to do in this situation? Because data of this client was lost suddenly.

Comments

  • vadim
    Options
    OnConnectionFail handler has 'cause' parameter. It may help find out disconnection reason.

    Also enable detailed logs on app start and check them in Unity console:
    PhotonNetwork.logLevel = PhotonLogLevel.Full;
    PhotonNetwork.networkingPeer.DebugOut = DebugLevel.INFO;