PUN 2.40 with Unity | If one player left the room, all the other players leave too except master

Options

Hello, I am using PUN 2.40 with Unity 2021.3.4 and facing an issue that is if one player leave the room, all the other players leave too except master and on master device (only on master) the networked gameobject of the player left is duplicated.

I've tried somethings and the only one worked for me is when setting PhotonNetwork.AutomaticallySyncScene to false.

I don't know if this is the solution for it or not.. but this is the only way worked for me !

if anyone can help me elaborate what's happening here ?

Comments

  • Tobias
    Options

    You may want to go back to a state that worked well. Or do a test project on the side, which has minimal scripts to try to get things working the way you need them. It is really hard to debug a networked game, when things are utterly wrong already and you have no idea where to begin. I

    We can't really help with the project, as we don't know it and have no time to debug. I also don't think I know what you want to achieve.

    So you might want to look up if AutomaticallySyncScene could even be related. In doubt, put Debug.Log in all the places of the code you suspect and figure out what happens.

  • UMXGado
    Options

    Okay, thank you Tobias, all I wanted to achieve is to stop the behaviour of ending the game when a non-master player leave the game. but anyways I will check everything again till I found what cause this unexpected behaviour. Thank you again

  • Tobias
    Options

    It should not be PUN which is ending the game if anyone leaves. The remaining players can continue as they like.