void OnEnable() { var _actions = Game.Instance.RequestActionMap <T>(); if (_actions.HasValue) { SetCallbacks(_actions.Value, this); DisableInputActions = () => { SetCallbacks(_actions.Value, null); Game.Instance.DisableActionMap <T>(); }; } else { enabled = false; } OnEnableCallback?.Invoke(this, _actions); }
void OnEnable() => OnEnableCallback?.Invoke();