PhotonNetwork.GetRoomList() is deprecated in PUN2 v2.5?

I cannot find the function and how can I get the room list when joining lobby?Thank you.


  • See the Migration Notes:

    There is a callback for that. As most games used the data for UI and cached it "again", we removed the cached list from PUN but still provide the updates.
  • I saw the comments about GetRoomList is not gone:

    /// On MasterServer this joins the default lobby which list rooms currently in use. ///
    /// The room list is sent and refreshed by the server. You can access this cached list by
    /// PhotonNetwork.GetRoomList().
    /// Per room you should check if it's full or not before joining. Photon also lists rooms that are
    /// full, unless you close and hide them ( = false and room.visible = false).
    /// In best case, you make your clients join random games, as described here:
    /// You can show your current players and room count without joining a lobby (but you must
    /// be on the master server). Use: CountOfPlayers, CountOfPlayersOnMaster, CountOfPlayersInRooms and
    /// CountOfRooms.
    /// You can use more than one lobby to keep the room lists shorter. See JoinLobby(TypedLobby lobby).
    /// When creating new rooms, they will be "attached" to the currently used lobby or the default lobby.
    /// You can use JoinRandomRoom without being in a lobby!
  • Hi @harlan,

    Thank you for pointing this out.
    All references to the removed PhotonNetwork.GetRoomList() will be cleaned up in the next update.
Sign In or Register to comment.