Navigation
API > API/Plugins > API/Plugins/EnhancedInput
An Input Action is a logical representation of something the user can do, such as "Jump" or "Crouch". These are what your gameplay code binds to in order to listen for input state changes. For most scenarios your gameplay code should be listening for the "Triggered" event on an input action. This will allow for the most scalable and customizable input configuration because you can add different triggers for each key mapping in the Input Mapping Context.
They are the conceptual equivalent to "Action" and "Axis" mapping names from the Legacy Input System.
Note: These are instanced per player (via FInputActionInstance)
| Name | UInputAction |
| Type | class |
| Header File | /Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/InputAction.h |
| Include Path | #include "InputAction.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType)
class UInputAction : public UDataAsset
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDataAsset → UInputAction
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| FModifiersChanged | TMulticastDelegate_NoParams< void > | InputAction.h | |
| FTriggersChanged | TMulticastDelegate_NoParams< void > | InputAction.h |
Constants
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| ActionsWithModifiedTriggers | TSet< const UInputAction * > | InputAction.h | |
| ActionsWithModifiedValueTypes | TSet< const UInputAction * > | InputAction.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| AccumulationBehavior | EInputActionAccumulationBehavior | This defines how the value of this input action will be calcuated in the case that there are multiple key mappings to the same input action. | InputAction.h |
|
| ActionDescription | FText | A localized descriptor of this input action. | InputAction.h |
|
| bConsumeInput | bool | Should this action swallow any inputs bound to it or allow them to pass through to affect lower priority bound actions? | InputAction.h |
|
| bConsumesActionAndAxisMappings | bool | Should this Input Action consume any legacy Action and Axis key mappings? If true, then any key mapping to this input action will consume(aka block) the legacy key mapping from firing delegates. | InputAction.h |
|
| bReserveAllMappings | bool | This action's mappings are not intended to be automatically overridden by higher priority context mappings. Users must explicitly remove the mapping first. NOTE: It is the responsibility of the author of the mapping code to enforce this! | InputAction.h |
|
| bTriggerWhenPaused | bool | Should this action be able to trigger whilst the game is paused - Replaces bExecuteWhenPaused. | InputAction.h |
|
| Modifiers | TArray< TObjectPtr< UInputModifier > > | Modifiers are applied to the final action value. | InputAction.h |
|
| OnModifiersChanged | FModifiersChanged | InputAction.h | ||
| OnTriggersChanged | FTriggersChanged | InputAction.h | ||
| TriggerEventsThatConsumeLegacyKeys | int32 | A bitmask of trigger events that, when reached, will consume any FKeys mapped to this input action. | InputAction.h |
|
| Triggers | TArray< TObjectPtr< UInputTrigger > > | Trigger qualifiers. | InputAction.h |
|
| ValueType | EInputActionValueType | The type that this action returns from a GetActionValue query or action event. | InputAction.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
const TObjectPtr< UPlayerMappableKeySettings > & GetPlayerMappableKeySettings() |
Returns the Player Mappable Key Settings for this Input Action. | InputAction.h | |
ETriggerEventsSupported GetSupportedTriggerEvents() |
Returns a bitmask of supported trigger events that is built from each UInputTrigger on this Action. | InputAction.h | |
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
InputAction.h | ||
virtual void PostEditChangeProperty
(
FPropertyChangedEvent& PropertyChangedEvent |
Track actions that have had their ValueType changed to update blueprints referencing them. | InputAction.h |