Players in room aren't updating.

Hello,

I am using the LoadBalancingClient in Unity and everything in my game seems to be working properly, except I can't find out that a player disconnected from the game.

I am calling client.Service() on every frame and immediately after I check the dictionary client.CurrentRoom.Players.

If I am the first player to enter the room, whenever another player connects, I can't see them. The dictionary has only 1 value.
If I am not the first player to enter the room, I see myself and the players that were there before me but not anyone who comes afterwards.

If someone disconnects from the room, the Dictionary still doesn't change and their IsInactive remains false (my PlayerTtl is set to 5 seconds).

Is there something I am missing that I need to do in order to update these values with the most recent ones other than calling for client.Service()?

Thanks,

Sen

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    edited February 2019
    Hi @GamingReborn,

    Thank you for choosing Photon!

    What is the version of the Unity SDK you are using? latest?

    How and when do you check the Players dictionary? inside callbacks?