How to use LoadBalancingClient to get list of rooms in lobby???

Options

I want to make a simple lobby menu screen where room buttons get created which other players can join (i.e. for 1v1 matches)


PhotonNetwork.OnRoomListUpdate() is supposed to get frequent updates of the room list in lobby. i have set a fixed region as well so players will join the lobby in the same region.

i set OnRoomListUpdate() to be called whenever player joins the lobby

however when debugging, player successfully joined the lobby (OnJoinedLobby) but received no room list update.


Question: after creating or joining a room, is the player still in the lobby? or is not in the lobby hence there was no RoomListUpdate.

Or is this because we have to use LoadBalancingClient to register for callback? how do i do this?

Best Answers

  • Tobias
    Tobias admin
    Answer ✓
    Options

    In a room, clients don't get room-list updates.

    Does that explain the issue?

  • Tobias
    Tobias admin
    Answer ✓
    Options

    The room lists you get are updates (aside from the initial one). You have to merge the entries into whatever you show...

Answers

  • Tobias
    Tobias admin
    Answer ✓
    Options

    In a room, clients don't get room-list updates.

    Does that explain the issue?

  • coiny
    Options

    ahhh thanks so much. i could get roomList now!

    Have a new problem though, roomList is always only having 1 entry (or possibly player drop

  • Tobias
    Tobias admin
    Answer ✓
    Options

    The room lists you get are updates (aside from the initial one). You have to merge the entries into whatever you show...

  • coiny
    Options

    oh wow ok i understand now. perfect!