Is the Lobby room a real room?

edited November 2019 in Native

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


  • 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,
  • Hi @Kaiserludi,

    Thank you for clarifying this.
  • VasilisVasilis
    edited November 2019
    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 you
  • Hi @Vasilis.

    There are Client::getIsInRoom(), Client::getIsInGameRoom() and Client::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.
Sign In or Register to comment.