Check if a player has left the game or server

Options
when a player log sin to my game I send a call to php on my server saying this guy is logged in using the players ID string and a number
1 = logged in
2 = in game
3 = disconnected

I am using a game object that is not destroyed across scenes to retian the guys id number from my sql database so that i can update points etc and also to tell if the guy is still connected. If the guy were to leave the game using the leave now button then fair enough I can send a call to my server saying the guy has left so set his status to 3. The problem I am having is that if the guy gets disconnected for any other reason I dont know how to tell photon to give a signal that the guy is now disconnected.

So basically i have joinroom() etc.. but what is the photon equivalent of unitys

OnPlayerDisconnected

??

I i can tell when i guy has been disconnected, I can send a call to my server and log the guy out.

Comments

  • OnPhotonPlayerDisconnected(PhotonPlayer otherPlayer) is called when a player leaves a room.

    OnDisconnectedFromPhoton is called when a player disconnects from the server.