private void OnDisable() { this.inputMapper.Stop(); this.inputMapper.RemoveAllEventListeners(); ReInput.remove_ControllerConnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerChanged)); ReInput.remove_ControllerDisconnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerChanged)); }
private void OnDestroy() { ReInput.remove_ControllerConnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerConnected)); ReInput.remove_ControllerDisconnectedEvent(new Action <ControllerStatusChangedEventArgs>(this.OnControllerDisconnected)); }