void OnEnable() { addressField.onValidateInput += OnValidateChar; NetEventManager.AddListener(NetEventType.Connected, OnConnectionEvent); NetEventManager.AddListener(NetEventType.Authenticated, OnAuthenticationEvent); NetEventManager.AddListener(NetEventType.LoggedIn, OnLoginEvent); NetEventManager.AddListener(NetEventType.Disconnected, OnConnectionFailed); }
void OnEnable() { NetEventManager.AddListener(NetEventType.PlayerEnter, OnPlayerEnterOrLeave); NetEventManager.AddListener(NetEventType.PlayerLeave, OnPlayerEnterOrLeave); NetEventManager.AddListener(NetEventType.PlayerReady, OnPlayerReady); NetEventManager.AddListener(NetEventType.LoggedOut, OnGameLogout); NetEventManager.AddListener(NetEventType.Disconnected, OnGameDisconnected); }