public bool ConnectToRegionMaster(CloudRegionCode region)
{
if (PhotonHandler.AppQuits)
{
Debug.LogWarning("Ignoring Connect() because app gets closed. If this is an error, check PhotonHandler.AppQuits.");
return false;
}
IsUsingNameServer = true;
this.CloudRegion = region;
if (this.State == global::PeerState.ConnectedToNameServer)
{
AuthenticationValues auth = this.CustomAuthenticationValues ?? new AuthenticationValues() { UserId = this.PlayerName };
return this.OpAuthenticate(this.mAppId, this.mAppVersionPun, auth, region.ToString(), requestLobbyStatistics);
}
string address = this.NameServerAddress;
if (!base.Connect(address, "ns"))
{
return false;
}
this.State = global::PeerState.ConnectingToNameServer;
return true;
}