PhotonNetwork.GetRoomList Disappeared? [PUN 2]
Options
Hey everyone,
I have just upgraded to PUN2 and I already saw a few stuff (API wise) that were changed
(it is a real shame the doc is not fully updated)
but It seems like you cant call PhotonNetwork.GetRoomList in PUN2, anyone knows why? or if there is a way to fix it?
Thanks!
I have just upgraded to PUN2 and I already saw a few stuff (API wise) that were changed
(it is a real shame the doc is not fully updated)
but It seems like you cant call PhotonNetwork.GetRoomList in PUN2, anyone knows why? or if there is a way to fix it?
Thanks!
0
Comments
-
UP0
-
Hi @BTODev,
there is a hint about the GetRoomList function in the Migration Notes. It states:PhotonNetwork.GetRoomList() is gone. You get a rooms list from ILobbyCallbacks.OnRoomListUpdate(List roomList) callabck and optionally cache it.
To see how this works now, I would recommend you taking a look at the Asteroids demo included in the PUN 2 package. It contains an example about the usage of OnRoomListUpdate and how to cache the room list.0 -
Yep I played quite a bit with the demo and saw how they implemented a pool system for the room list but I just thought that maybe there is a shorter way to handle the room polling like in PUN1Christian_Simon said:Hi @BTODev,
there is a hint about the GetRoomList function in the Migration Notes. It states:PhotonNetwork.GetRoomList() is gone. You get a rooms list from ILobbyCallbacks.OnRoomListUpdate(List roomList) callabck and optionally cache it.
To see how this works now, I would recommend you taking a look at the Asteroids demo included in the PUN 2 package. It contains an example about the usage of OnRoomListUpdate and how to cache the room list.
Thanks for the reply!0