How-To: Bind Native Input
Goal: handle a NativeInputActions entry (move, look, jump) - in Blueprint with an Enhanced Input event, in C++ by tag with BindNativeAction.
UCrimsonInputConfig with NativeInputActions filled and a pawn using UCrimsonInputComponent.1. Handle the action
In Blueprint you do not need the plugin's binder for native input - place the standard Enhanced Input Action event for your UInputAction and handle it. In C++, BindNativeAction resolves the tag to the action in NativeInputActions, binds it for one ETriggerEvent, and returns the bind handle (or 0 if the tag is missing).
NativeInputActions logs a warning and returns handle 0.2. Remove bindings with RemoveBinds (C++)
When you unpossess or tear down, call RemoveBinds with the handle array. It removes each binding and empties the array.
CIC->RemoveBinds(NativeBindHandles); // clears every handle it holds
3. Tap / Hold with the press-and-hold trigger
Add UInputTriggerCrimsonPressAndHold to a UInputAction's Triggers array when one action needs Tap / Hold / Toggle behavior. It fires Triggered once on actuation, stays Ongoing while held, and fires Completed only on a real release - so tap and hold are distinguishable, and an ability binding's Completed+Canceled release still fires.
UCrimsonGameplayAbility_BindNativeInput activates once on spawn, calls BindNativeAction, and re-checks the ability's tag requirements per input event. That pattern is only for always-on input (move, look, sprint); discrete actions use normal input-triggered abilities. See Concept: Full-Stack Integration & Multiplayer.See also
- How-To: Bind Ability Input - the GAS binders and release semantics.
- Concept: Full-Stack Integration & Multiplayer - ability-self-binding for native input.