whenever i leave a room it kicks all players out how could i fix this
whenever any player leaves master or not it kicks everyone out, how could i stop this. my code: public void Menu()
{
if (view.IsMine)
{
PhotonNetwork.LeaveRoom();
SceneManager.LoadScene("MenuM");
}
}
Best Answer
-
I had 2 override voids and one didn't have view is mine so I got rid of the duplicate and it fixed the problem I just forgot to say that here, but thanks for your help anyways.
0
Answers
-
Keep in mind that "IsMine" can be true for one instance, if a prefab is instantiated by each player.
Meaning: If each player controls at least one object with this script, it may leave the room (if Menu() is being called).
0 -
I had 2 override voids and one didn't have view is mine so I got rid of the duplicate and it fixed the problem I just forgot to say that here, but thanks for your help anyways.
0