public static void SetCancelListenerOnce(this InputAction action, Action <InputAction.CallbackContext> context, bool enable) { if (enable) { action.AddCancelListenerOnce(context); } else { action.RemoveCancelListener(context); } }
public static void AddAnyListenerOnce(this InputAction action, Action <InputAction.CallbackContext> context) { action.AddPerformListenerOnce(context); action.AddCancelListenerOnce(context); }