Random disconnect after "x" seconds with 2 PLAYERS ONLY

Options
Hi everyone,
When I log into a server with some user in there (in my case a friend or a second build) - sometime after a few seconds that me or the other user is running around the server, it loses the connection to Photon (not exiting back to the menu as it should LOCALY) the player does get remove from the game (other users and the local users cant see him) BUT he is still in the game scene and I just cant find a way to solve this

My first thought it was something related to the movement script that the Photonview is observing so I just changed everything to Photon transform component and still the same issue
*The game is 2D not 3D*

I would highly appreciate some help here, thanks!

Comments

  • Hi @BTODev,

    I recommend you adding the void OnConnectionFail(DisconnectCause cause) callback. This one gets called if the client get disconnected after the connection has been established before. Having added this you can check out what might be the reason for the disconnect by taking a look at the DisconnectCause.

    [...] it loses the connection to Photon (not exiting back to the menu as it should LOCALY) the player does get remove from the game (other users and the local users cant see him) BUT he is still in the game scene and I just cant find a way to solve this


    Do you use the OnLeftRoom callback? If not I would recommend you adding this one to get notified locally, if the client has left the room. From inside this callback you can load another scene.