Ejemplo n.º 1
1
    // Use this for initialization
    void Start()
    {
        loadBalancingClient = new LoadBalancingClient(null, TurnbasedAppId, "1.0"); // the master server address is not used when connecting via nameserver

        AuthenticationValues customAuth = new AuthenticationValues();
        customAuth.AddAuthParameter("username", UserName);  // expected by the demo custom auth service
        customAuth.AddAuthParameter("token", UserToken);    // expected by the demo custom auth service
        loadBalancingClient.AuthValues = customAuth;

        loadBalancingClient.AutoJoinLobby = false;
        loadBalancingClient.ConnectToRegionMaster("us");
    }