Lobby players list doesn't update!

Why “Players” list doesn’t update when a new player join the lobby that I created?

Should I use LocalLobby as in “com.unity.services.samples.game-lobby” project?

I used Photon and SmartFoxServer network solutions but I haven’t seen such a use.

Do you have a plan to change this use?

Have a good day.
Thanks.

I work on “Lobby” and “Lobby Data”
Current lobby object’s data changes when run “LobbyService.Instance.UpdateLobbyAsync” method.

But as I said in my first post.: Players list doesn’t change.
Is there any road map to change this behavior?

Edit:
Folks, This Lobby behavior is very strange.
When Host player change the “Public Lobby Data”; host’s current lobby instance’s “lobby data” is changing.
But other player’s current lobby instance’s “lobby data” doesn’t change!
Note: I don’t use “LocalLobby” structure and just want to understand Lobby behaviour.

Hi Mj-Kkaya,

The current expectation is that all of the players in your lobby will periodically poll the Lobby server to get the newest version of the lobby. If you call “UpdateLobbyAsync”, the player calling that will see the updated lobby, and likewise if you join a lobby as a player, the player will see themselves in the lobby. However, all other players will not know about any changes unless they are periodically calling “GetLobbyAsync” to refresh their local state. Unless you manually update your local copy of a lobby, it will not reflect the changes made by other players.

It is worth mentioning that real-time Lobby events are coming soon, meaning players will be able to get notified about other players’ changes without having to call “GetLobbyAsync”.

Thanks for reply bartj-unity.
Will we not need to use the “LocalLobby” object instance after this update?

Hi bartj-unity.
I’m working on Lobby 1.1.0-pre.4 version.
So, I’m using “LobbyChanged” event for change local lobby instance like this.
Is this usage correct?

m_LobbyEventCallbacks.LobbyChanged += OnLobbyChanged;

private void OnLobbyChanged(ILobbyChanges lobbyChanges)
{
if(!lobbyChanges.LobbyDeleted)
lobbyChanges.ApplyToLobby(m_CurrentLobby);
}```

Yup, that looks correct. Our Lobby events documentation may be useful for you.

1 Like

Hi alexpro23,

Which version of the Lobby package are you using? And could you elaborate on who’s making the changes to the lobby in this scenario?

Hi bartj, thanks for replying. I fixed my issue by updating to the newest (pre-5) version of lobby after I found this other post: https://discussions.unity.com/t/915521

Apparently it was an issue on lobby’s side with something cache-related.

@bartj-unity If a lobby player kills the app or disconnects the internet other players do not get the OnPlayerLeftLobby event even after a timeout period. Please fix this. issue. Tested on android.
Using Lobby SDK version 1.1.0 Pre-5

Hi @sathya ,
Do you have multiple “Environment”?
And could you check “Disconnect Removal Time” at Lobby Config page?

I have two Environments “Dev” and “Production”, I have kept 30secs in both environments.

I have the same problem, if player disconnects without leaving the lobby properly, lobby thinks the player never leaves. Disconnect removal time does not seem to work as I expect it to… surely the solution cant be to manually remove or kick a client that disconnects? Then finding the correct player to remove from the lobby would require to add clientID in the lobby options.

3 Likes

Hey I have the same problem did you find a solution?