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