How-To: Create an Input Config
Goal: author a UCrimsonInputConfig that maps your UInputAction assets to gameplay tags, so all binding and lookups happen by tag.
Prerequisites
You have your
UInputAction assets (Quick Start step 2) and an InputTag gameplay-tag hierarchy (or you will add one in step 3).1. Create the asset and fill the lists
UCrimsonInputConfig is a Const data asset with three arrays of FCrimsonInputAction (an InputAction + InputTag pair). Put each action in the list that matches how it is consumed.
| List | Bound how | Examples |
|---|---|---|
NativeInputActions | BindNativeAction -> a C++ callback (or a Blueprint Enhanced Input event) | Move, Look, Jump, Crouch |
AbilityInputActions | BindAbilityActions / BindAbilityActionsWithAction -> GAS by input tag | Ability.1 - Ability.6, Confirm, Cancel |
UIInputActions | FBindUIActionArgs(UInputAction*, ...) in a CommonUI widget | UI.Escape, UI.Confirm, UI.Back, UI.Tab |
Verify
The asset shows all three arrays and each row's InputTag picker is scoped to your
InputTag parent tag.2. Look actions up by tag
The three Find...InputActionForTag functions are the read side of the config - they are BlueprintCallable, so both C++ and Blueprint resolve an action from a tag. Pass bLogNotFound = false for optional lookups. You call them on a config reference - see How-To: Get the Building Blocks step 2.
Verify
A valid tag returns its
UInputAction; an unmapped tag returns null (and logs only when bLogNotFound is true).3. Name your input tags
Keep input tags under a dedicated InputTag parent so the pickers stay scoped. Declare them in DefaultGameplayTags.ini (or as native tags):
; DefaultGameplayTags.ini+GameplayTagList=(Tag="InputTag.Move")+GameplayTagList=(Tag="InputTag.Look.Mouse")+GameplayTagList=(Tag="InputTag.Jump")+GameplayTagList=(Tag="InputTag.Ability.1")+GameplayTagList=(Tag="InputTag.Ability.Confirm")+GameplayTagList=(Tag="InputTag.UI.Escape")+GameplayTagList=(Tag="InputTag.UI.Back")
See also
- How-To: Get the Building Blocks - how to reference this config from Blueprint or C++.
- How-To: Bind Ability Input - forward
AbilityInputActionsto your ability system. - How-To: Bind Native Input - wire
NativeInputActionsto C++ callbacks. - Concept: Tag-Driven Input - why the config is the indirection layer.