How to get a list of rooms?

Options
Hey all, I've been trying to create a room browser using GetRoomList and apparently it's been deprecated, how can I get a list now?

Answers

  • LeytonMate
    Options
    Bump
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2019
    Options
    Hi @LeytonMate,

    GetRoomList is removed in PUN2. Are you using PUN2?
    If yes, then as mentioned in the "Migration Notes":
    You get rooms list and updates from ILobbyCallbacks.OnRoomListUpdate(List<RoomInfo> roomList) callback. You can optionally cache it, update it and clear it when needed.
  • LeytonMate
    Options
    @JohnTube I'm using PUN1
  • LeytonMate
    Options
    @JohnTube hello?
  • JohnTube
    JohnTube ✭✭✭✭✭
    edited May 2019
    Options
    GetRoomList exists in PUN1 and can be used.

    I have answered (and updated my answer) here.
  • LeytonMate
    Options
    I've done all of that, the players are in the same lobby. For some reason GetRoomList still returns nothing even though the room is in the same region and same version. Did I miss a step?
  • LeytonMate
    Options
    They're also both in a default lobby
  • LeytonMate
    Options
    I'll send my code when I get home
  • LeytonMate
    Options
    @JohnTube I heard I have to use OnReceivedRoomListUpdate, still doesn't work