Search Unity

"No Lobby for Lobby Player" Error and Ready Flags don't sync

Discussion in 'Multiplayer' started by Stratos-Mak, Jun 18, 2015.

  1. Stratos-Mak

    Stratos-Mak

    Joined:
    Aug 14, 2014
    Posts:
    11
    Using the NetworkLobbyManager, I'm hosting a game over the matchmaking server, but when a client enters the lobby (even the server/host) it gives me this error:


    This is my lobby player:


    And this is my lobby manager:


    I've been ignoring it till now, but when I got to the point where I was testing the Ready Flags, I noticed (on the lobby gui) that the ready flags weren't synced between players. When setting ready on a client, this client's will show him as ready, but the other clients will show him as not ready.
    I thought ready flags are supposed to be synced across the players. Do I have to sync them in some way? Or is this error messing me up?

    There isn't very detailed documentation yet, and not so many posts about the new networking, that's why I thought of posting here.

    Thanks in advance!
     
    Last edited: Jun 19, 2015
  2. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    That error means that the NetworkManager singleton is not a an instance of NetworkLobbyManager...

    But that doesnt sound like the case here?
     
  3. Stratos-Mak

    Stratos-Mak

    Joined:
    Aug 14, 2014
    Posts:
    11
    I just implemented the NetworkLobbyManager into my own script and wrote my stuff...
    The thing is that I haven't seen anything like this in other threads and there is nothing on the documentation....
     
  4. seanr

    seanr

    Unity Technologies

    Joined:
    Sep 22, 2014
    Posts:
    669
    The NetworkStarter sample has a lobbyOldGUI scene that uses the NetworkLobbyManager. Does that work for you?
     
  5. Stratos-Mak

    Stratos-Mak

    Joined:
    Aug 14, 2014
    Posts:
    11
    I just tried the NetworkStarter lobby, using it as a server and connecting my client, and it didn't give me this error.
     
  6. hugebug

    hugebug

    Joined:
    Jun 10, 2015
    Posts:
    17
    I am having the same issue. any update on how to fix it ?
     
  7. hugebug

    hugebug

    Joined:
    Jun 10, 2015
    Posts:
    17
    After hours fighting, I found I should not write a function named "Awake" while overriding NetworkLobbyManager class, otherwise, the NetworkLobbyManager.singleton is null. (which caused the error)

    I am wondering, is the NetworkLobbyManager not supposed to be overriden ?
     
    Emmanuel_Charon likes this.
  8. Emmanuel_Charon

    Emmanuel_Charon

    Joined:
    Jul 22, 2015
    Posts:
    4
    Thank you hugebug, you just saved me a lot of time!

    Similarly, I think there is a bug when writing a function named "Start" in classes which extend NetworkLobbyPlayer. It cost me several hours to find that out. When I do, the LobbyPlayer is destroyed when switching to the playScene, and the GamePlayer is not created.

    There is actually a comment about that in the NetworkServer sample project:

    Code (CSharp):
    1. /*
    2. * Start() {} is avoided because it creates wierd bugs
    3. * (LobbyPlayer and GamePlayer won't be instantiated)
    4. */
    5.  
     
    Last edited: Sep 8, 2015
  9. TehGM

    TehGM

    Joined:
    Nov 15, 2013
    Posts:
    89
    Yes. I've noticed it too, when developing my custom wrapper. In my case it wasn't an issue, but Unity should have Awake virtual in this case. It won't break anything as Unity uses reflection anyway, and we'd be able to easily override it.