Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Photon JoinLobby not working

Discussion in 'Multiplayer' started by Ewu_Uwe, Jan 11, 2021.

  1. Ewu_Uwe

    Ewu_Uwe

    Joined:
    Apr 13, 2020
    Posts:
    21
    Hi, I tried to Join a Lobby in Photon, but it always gives me the error:
    Operation JoinLobby (229) not called because client is not connected or not ready yet, client state: PeerCreated

    PhotonNetwork.JoinLobby() Gets called in OnConnectedToMaster()
    Thanksfor your help
     
  2. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,957
    You first have to connect. This is a short workflow, which needs to complete, so we added a callback, telling you when that's done. Then, you could join a lobby (but don't have to).

    The Basics Tutorial is a good first read. Code-along and you will not stumble over those basics anymore.
     
  3. Ewu_Uwe

    Ewu_Uwe

    Joined:
    Apr 13, 2020
    Posts:
    21
    Yes, I thought OnConnectedtoMaster gets called when you're connected
     
  4. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,957
    I just checked in PUN 2.27 and JoinLobby can be called in OnConnectedToMaster.
    Do you run an older version?
     
  5. Ewu_Uwe

    Ewu_Uwe

    Joined:
    Apr 13, 2020
    Posts:
    21
    No I run PUN 2.27
     
  6. tobiass

    tobiass

    Joined:
    Apr 7, 2009
    Posts:
    2,957
    Do you have other PhotonNetwork calls in OnConnectedToMaster?
    What exactly does the log say (it should have some hint what state your client is in)...
     
  7. ArckimiDer

    ArckimiDer

    Joined:
    Nov 10, 2021
    Posts:
    1
    Hey Bro!today i met the same problem,finally i find in Resource if you set photon start in offline would cause this problem.may be you fixed hhh
     
    diablo_d_s and MontanaAnton like this.
  8. savagecabbage40

    savagecabbage40

    Joined:
    Apr 17, 2020
    Posts:
    1
    Thank you so much!! That worked for me