Room list (Default Lobby) only visible in JoinedLobby state

Options
It seems that I only get list of Rooms in a Lobby('Default') while in the JoinedLobby state, once I enter a room, the GetRoomList return zero games.

Is there a option I can set to see rooms in a lobby from my client? I need a test mode, where I controll which game I join to test online mode and stop joining random rooms.

Comments

  • vadim
    Options
    You are right. Room list is not available while client is in the room.
    You need another client (not PUN but dotnet Photon SDK's) connected to the lobby in parallel in your application.
  • prage
    Options
    I am using Photon Unity Network in a unity application, so how do I create a additional connection to get the rooms in a lobby?
  • vadim
    Options
    The idea was to put dotnet SDK files into Assets folder (Chat API integrated that way).
    But this does not work currently. Sorry, I was wrong. It's impossible to create 2nd LoadBalancing client in PUN application (at least there is no simple way to do so).
  • prage
    Options
    Managed to work around the issue, Start application and stop in JoinedLobby State, which you can get list of Rooms. Use the room name on second client and call JoinRoom().
  • digitalCowboy
    Options
    Hi prage, just looking for some clarification on your workaround to see if it fits our need.
    If I understand correctly, you have one application and create a photon client instance which you connect to default lobby and then get room list of existing rooms.
    I am not clear on the use of the second client so I must be missing something :/

    Can't you just joinRoom using your desired room name from the photon client instance you already have that you used to get the room list (and room name) in the first place?
  • vadim
    Options
    Hi,
    Normally you use single client for entire connection / join process. Client can call joinRoom (or createRoom) only while it's connected to the lobby. So it can't avoid getting room list before joining the room.
  • Tobias
    Options
    While a client is in the lobby, it gets that lobby's room list. Joining a lobby is optional but by default, PUN joins the default lobby. Turn this off by setting PhotonNetwork.autoJoinLobby to false.
    When a room gets created while in a lobby, it will belong to that lobby.
    You don't have to be in a lobby to create or join rooms. Simply call join with a specific room name and the server will find it or return a fitting error.
    In a room, you don't get any room lists anymore but you can show the room's name or send it via some invitation, so others can join.
  • prage
    Options
    We have multiple developer/QA working on the project, if we use automatic joining random rooms, we would enter rooms and interrupt developer sessions. By using Game List, developers create their own room and then join from the second client for software development. Hope this explains the reason for getting room list.
  • Tobias
    Options
    You could set the room's visible and open properties, when a game starts and should not be interrupted anymore.
    Or your developers can easily use another "game version" value to separate their games from anyone else's.
    That might be closer to what you want to have in the released game, as far as i understood you?