Leaveroom Issue

Options
This question was already ask by "http://forum.photonengine.com/discussion/6696/solved-when-use-photonnetwork-leaveroom-destroy-other-objects". The solution given is not good. If a button is used to leave the room, everything is Ok but if leaveroom() is triggered by an event then all the players in the room are thrown out as well.
if i use keyboard/joystick input to trigger leaveroom, this works as well.
if (Input.GetKeyDown (KeyCode.Y)) { PhotonNetwork.LeaveRoom();} // This is ok only one player thrown out

if (hp <= 0) { PhotonNetwork.LeaveRoom();} // Not good, all player are thrown out.
i did check that only the hp of player i wanted out was being decrease.</i>

Help would be much appreciated. Thanks

Comments

  • vadim
    Options
    LeaveRoom method documentation states that it will clean up all (network) GameObjects with a PhotonView, unless you changed autoCleanUp to false. Did you try autoCleanUp?