public override void OnDeselect() { base.OnDeselect(); // Unbind all inputs on this UnitHandler (meaning that callbacks will now longer be invoked for this unit on input) DefaultUnitHandler.UnbindAllInputs(ActionInputs); ClearActionInput.Unbind(DefaultUnitHandler.Instance.ClearActionQueueInput); }
private void OnDestroy() { // Safely unbind all the associated inputs of this UnitHandler DefaultUnitHandler.UnbindAllInputs(ActionInputs); }