- Home /
Photon Networking - Getting RoomList inside a Room
I was hitting an "issue" where I was not getting updates to my room list while my player was inside a room. I'm using a scene for my lobby, and Photon didn't like me doing networking IN the lobby like PhotonNetwork.Instantiate(...) so I just made an actual room and send everyone there....Works good until I want to find what rooms are available... The description tag on GetRoomsList() says it doesn't work while in a room!!!! WHY!?
Anyone know a workaround? This restriction seems.....awful.
What do you need PhotonNetwork.Instantiate() for? Why is 'regular' Instantiate not sufficient?
Because it's using networking of course :P All players in the "lobby" are represented by an avatar...it goes to say that everyone connected to the "lobby" needs to see the connecting players avatar as well.
I'm an idiot. I just forgot that RPCs in the Lobby are dropped as well. If they didn't I would've proposed regular Instantiate inside an RPC-called function. But that is no good.
Answer by JoshuaPack · Feb 23, 2014 at 05:11 PM
This is probably not the answer you are looking for, however, if you have a separate server that you connect to, you can keep all rooms within SQL. It depends on what you are doing to create these rooms, but you will need to make sure to keep the sql updated with room available and so forth. You can then just make a call to the sql for the rooms within another room.
This is the only way I know of looking through documentation of Photon Unity Networking that I can see will work.
Hopefully PUN will support this down the road, but looks like it is currently not supported.
Photon does not support room lists while being in a room.
The rooms are distributed across multiple machines and we don't sync the room lists with these servers.
It's not planned to change this.