PUN2 Room List Updated Called with 0 rooms in list

Hi, I am facing issue then parsing from all rooms in OnRoomListUpdate callback. Callback is call each time but with empty list in parameter

Comments

  • gulshangolechha
    edited April 2021
    public override void OnRoomListUpdate(List<RoomInfo> roomList)
        {
            Debug.Log("OnRoomListUpdate Count: " + roomList.Count);
    
            for (int i = 0; i < roomList.Count; i++)
            {
                Debug.Log("Room Name: " + roomList[i].Name);
            }
    
            rooms.Clear();
            rooms.AddRange(roomList);
        }
    
  • JohnTube
    JohnTube ✭✭✭✭✭
    Hi @gulshangolechha,

    Thank you for choosing Photon!

    roomList is empty could be the expected behaviour when the lobby is really empty.
    Make sure to use other clients that create rooms on the same lobby to test this properly.

    And also you can find a snippet of how to handle rooms list here.