OnConnectedToMaster not called when Auto-Join Lobby setting is checked

Options
How to reproduce:

On the PhotonServerSettings ScriptableObject, enable Auto-Join Lobby.
Create a new MonoBehaviour and implement the Photon messages.
On Start, invoke PhotonNetwork.ConnectUsingSettings().
OnConnectedToMaster will not be invoked.
Uncheck Auto-Join lobby and try again. This time it will be invoked.

Btw the same tolken, is it possible to join a room without first joining a lobby?

Comments

  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    Hi @rafael_at_jags,

    This behaviour is by design yes.

    is it possible to join a room without first joining a lobby?

    Yes, you can join a room randomly or by name without joining a lobby. The lobby is useful for room listing.
  • It's not very intuitive because to join a lobby you first have to join a game server. Also it is not documented anywhere that it will not be called in that case.
  • JohnTube
    JohnTube ✭✭✭✭✭
    Options
    It's not very intuitive

    It depends on how you see things.
    to join a lobby you first have to join a game server

    I guess you mean Master Server and not Game Server.
    Also it is not documented anywhere that it will not be called in that case.

    OK we will add that to the docs somewhere.
  • I guess you mean Master Server and not Game Server.


    Good catch.
    But yes, seeing how it is necessary to join the Master before joining a lobby, I think it only makes sense that ConnectToMaster is called, otherwise it's basically skipping a step. You're basically saying that the player did not join the master server, he joined the lobby, which is not possible without first connecting to the master server.

    Anyway, that's just my view on it.