Search Unity

uLink + uLobby + uZone2 doubts (^.~)

Discussion in 'Multiplayer' started by neoneper, May 22, 2015.

  1. neoneper

    neoneper

    Joined:
    Nov 14, 2013
    Posts:
    48
    Where do fit the uLobby?

    I'm facing many difficulties in understanding and developing my application using the uzone, for example material is very limited and answers from oficial forum as well.

    I need to start new instances of my server dynamically.
    I am using the example of the website, but it is all done manually.

    I believe the solution is in use uLobby. Correct?
    Looking at my diagram, I would like to know the following:
    Where do fit the uLobby?


     
  2. neoneper

    neoneper

    Joined:
    Nov 14, 2013
    Posts:
    48
    Watching all the examples available in webSite, I believe that my second diagram is correct.
    did right?

    uLobb -> connected to uZone Master

    Code (CSharp):
    1. uLobby.Lobby.AddListener(this);
    2.   uZone.InstanceManager.Initialize();
    3.  
    4.   uZone.ConnectRequest connectionRequest = uZone.InstanceManager.Connect(uZoneHost, uZonePort);
    5.   yield return connectionRequest.WaitUntilDone();
    6.  
    7.   if (connectionRequest.hasFailed)
    8.   {
    9.   Debug.LogError(connectionRequest.GetErrorString());
    10.   yield break;
    11.   }
    12.   else
    13.   {
    14.   Debug.Log("Connected to uZone");
    15.   uLobby.Lobby.InitializeLobby(maxLobbyConnections, lobbyPort);
    16.   }
    Clients -> connects to the lobby, and the lobby waiting return a valid server for it to connect.

    Did Right?