Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Using NetworkLobbyManager with MasterServer??

Discussion in 'Multiplayer' started by Mr-FarePlay, Jun 12, 2017.

  1. Mr-FarePlay

    Mr-FarePlay

    Joined:
    Nov 22, 2015
    Posts:
    4
    Good day game devs,

    I'm hopping to find a final answer to this here. I've been trying to get this to work for 2 weeks with no luck.

    Basically I'm trying to put all players I get from for 1 'session' in the Lobby.

    The issue is as follows:

    For the MasterServer:
    1- The host player needs to call Network.InitializeServer and then MasterServer.RegisterHost
    2- The client player needs to call Network.Connect with the HostData retrieved from the (RequestHostList/PollHostList) combo

    For the NetworkLobbyManager:
    1- The host player needs to call the NetworkLobbyManager.StartHost
    1- The client player needs to call the NetworkLobbyManager.StartClient

    The problem??

    1- You can't call Network.Connect and NetworkLobbyManager.StartClient on the same instant, so I can't run both using their respective calls
    2- NetworkLobbyManager.StartClient doesn't take HostData as an argument, so I can't find away around Network.Connect
    3- Although calling Network.InitializeServer and NetworkLobbyManager.StartHost together seems to work, for some reason clients using NetworkLobbyManager.StartClient can't seem to connect when both are used. The client always gets a timeout error.

    This is all I got, and I can't figure out what do to next.

    Any help would be appreciated.

    Cheers