CreateRoom failed even though I'm connected and in the lobby

Options
Hey. I'm a Unity developer but I'm new to network programing and PUN2, so I apologize if my question doesn't make sense.

I work for a VR center and we have a somewhat peculiar setup: 1. A "master" computer with a console of sorts that solely deals with room management and which is handled by the team, and 2. The actual game installed on individual Oculus Quest 2 headsets where our patrons can only join open rooms and play the game.

When I create a room on the master, the room is properly generated but I automatically join it — even though I'm using CreateRoom, not JoinOrCreateRoom. I find that puzzling on its own. And then if I try to create a room from there, it fails; I get the following error:
CreateRoom failed. Client is on GameServer (must be Master Server for matchmaking) and ready. Wait for callback: OnJoinedLobby or OnConnectedToMaster.

And that's even though I am connected to the master server and have joined the lobby on start.

Assistance would be greatly appreciated. Cheers!

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @PascalTheDog,

    Thank you for choosing Photon!

    The error says "Client is on GameServer".
    This means the client is joined to a room (OR in the process of joining a room OR in the process of leaving a room).
    In any case the client is not joined to the lobby and not connected to the MasterServer where you can call create or join rooms.

    Maybe you already called CreateRoom and then did it again: first time it worked and second time it didn't.
  • JohnTube wrote: »
    Hi @PascalTheDog,

    Thank you for choosing Photon!

    The error says "Client is on GameServer".
    This means the client is joined to a room (OR in the process of joining a room OR in the process of leaving a room).
    In any case the client is not joined to the lobby and not connected to the MasterServer where you can call create or join rooms.

    Maybe you already called CreateRoom and then did it again: first time it worked and second time it didn't.

    Thank you for your response. Yes, that's what happened.

    How would I go about creating a room without joining it? I'd need the central computer to be able to create and manage rooms on UI button presses, which I assume means it should always remain connected to the MasterServer.