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