public void OnStartClick() { _photonServer.CallConnect(); }
private void OnStateChanged(ClientState state) { UnityEngine.Debug.Log("State: " + state); switch (state) { case ClientState.Disconnected: PhotonServer.CallConnect(); break; case ClientState.PeerCreated: break; case ClientState.Authenticating: _sceneDescription.UI.MenuUI.gameObject.SetActive(false); break; case ClientState.Authenticated: break; case ClientState.JoinedLobby: //PhotonServer.ConnectToRandomRoom(); break; case ClientState.DisconnectingFromMasterserver: break; case ClientState.ConnectingToGameserver: break; case ClientState.ConnectedToGameserver: break; case ClientState.Joining: break; case ClientState.Joined: break; case ClientState.Leaving: break; case ClientState.DisconnectingFromGameserver: break; case ClientState.ConnectingToMasterserver: break; case ClientState.Disconnecting: break; case ClientState.ConnectedToMasterserver: PhotonServer.ConnectToRandomRoom(); break; case ClientState.ConnectingToNameServer: break; case ClientState.ConnectedToNameServer: break; case ClientState.DisconnectingFromNameServer: break; } }