Remotely disconnect playerObject owned by the server

Options
So, if a client instantiates an object with PhotonNetwork, that client owns the object and can make changes and all that, and if that client disconnects for any reason (which is amazing) the object is destroyed.

What about when the server owns the playerObject (for auhoritative reasons)? Now when a client disconnects there's no easy way of telling the server to destroy that game object. I figure it doesn't make sense to re-write all the code Exit Games already has to handle the disconnect reasons, so how do we hook into it to trigger a Destroy() call on the server when a client disconnects for any reason?

Comments

  • vadim
    Options
    I guess you mean master client by server.
    If so, handle OnPhotonPlayerDisconnected and destroy disconnected player's objects on master client.