Is the Lobby room a real room?
Options
Hi,
I am doing some tests, and I found that if I have joined a room, I can not Join a Lobby room (default type) unless I leave that room. But, when I am in the Lobby room and I ask the Photon engine to return the name of the current room, I get the name of the first room (and not the name of the Lobby room). Still, I can not interact with the players in that first room, because I am in the Lobby room. Thus:
1. Why the Photon engine does not return the name of the Lobby room?
2. Do I need to leave the Lobby room before I can join again that first room?
Thank you
I am doing some tests, and I found that if I have joined a room, I can not Join a Lobby room (default type) unless I leave that room. But, when I am in the Lobby room and I ask the Photon engine to return the name of the current room, I get the name of the first room (and not the name of the Lobby room). Still, I can not interact with the players in that first room, because I am in the Lobby room. Thus:
1. Why the Photon engine does not return the name of the Lobby room?
2. Do I need to leave the Lobby room before I can join again that first room?
Thank you
0
Comments
-
Hi @Vasilis.
No, The Lobby is not a normal room comparable to a game room, but special.
1) Because 'currentlyJoinedRoom' always refers to a game room. Either the one that you are currently in, or when you are not in a game room at the time of the call, but have been in one previously, it will return the cached name of the last game room that you were in.
2) You don't have to leave it explicitly, as the lobby will be implicitly left when you enter a game room. If 'autoJoinLobby' is turned on (the default), then you will also implicitly join the default lobby again when leaving a room.
Kind regards,
Stefan.0 -
0
-
Hi @Kaiserludi,
How can I tell if I am in a room or in the Lobby? Is there a method (for iOS and Android) that I can call to get that information?
Thank you0 -
Hi @Vasilis.
There areClient::getIsInRoom()
,Client::getIsInGameRoom()
andClient::getIsInLobby()
.
The first one returns true, if the instance is either inside a game room or inside a lobby, false otherwise, the second one returns true if the instance is inside a game room, false otherwise, and the third one returns true if the instance is inside a lobby, false otherwise.0