Navigation
API > API/Plugins > API/Plugins/EnhancedInput
UInputMappingContext : A collection of key to action mappings for a specific input context Could be used to: Store predefined controller mappings (allow switching between controller config variants). TODO: Build a system allowing redirects of UInputMappingContexts to handle this. Define per-vehicle control mappings Define context specific mappings (e.g. I switch from a gun (shoot action) to a grappling hook (reel in, reel out, disconnect actions). Define overlay mappings to be applied on top of existing control mappings (e.g. Hero specific action mappings in a MOBA)
| Name | UInputMappingContext |
| Type | class |
| Header File | /Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/InputMappingContext.h |
| Include Path | #include "InputMappingContext.h" |
Syntax
UCLASS (MinimalAPI, BlueprintType, Config=Input)
class UInputMappingContext : public UDataAsset
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → UDataAsset → UInputMappingContext
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| ContextDescription | FText | Localized context descriptor. | InputMappingContext.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ForEachKeyMapping
(
TFunctionRef< void(const FEnhancedActionKeyMapping&)>&& Func |
Executes the given lambda on every default and override key mapping specified on this mapping context. | InputMappingContext.h | |
FGameplayTagQuery GetInputModeQuery() |
InputMappingContext.h | ||
FEnhancedActionKeyMapping & GetMapping
(
TArray< FEnhancedActionKeyMapping >::SizeType Index |
InputMappingContext.h | ||
const TArray< FEnhancedActionKeyMapping > & GetMappings () |
Mapping accessors. | InputMappingContext.h | |
const TArray< FEnhancedActionKeyMapping > & GetMappingsForProfile
(
const FString& ProfileId |
InputMappingContext.h | ||
TArray< FString > GetProfilesWithOverridenMappings() |
InputMappingContext.h | ||
EMappingContextRegistrationTrackingMode GetRegistrationTrackingMode() |
InputMappingContext.h | ||
bool HasMappingForInputAction
(
const UInputAction* Action |
Returns true if this Input Mapping Context contains a reference to the given Input Action in its default or profile override mappings. | InputMappingContext.h | |
bool HasMappingsForProfile
(
const FString& ProfileId |
InputMappingContext.h | ||
virtual EDataValidationResult IsDataValid
(
FDataValidationContext& Context |
InputMappingContext.h | ||
FEnhancedActionKeyMapping & MapKey
(
const UInputAction* Action, |
Map a key to an action within the mapping context. | InputMappingContext.h |
|
virtual void PostLoad() |
InputMappingContext.h | ||
virtual void Serialize
(
FArchive& Ar |
InputMappingContext.h | ||
bool ShouldFilterMappingByInputMode() |
InputMappingContext.h | ||
void UnmapAll() |
Unmap everything within the mapping context. | InputMappingContext.h |
|
void UnmapAllKeysFromAction
(
const UInputAction* Action |
Unmap all key maps to an action within the mapping context. | InputMappingContext.h |
|
void UnmapKey
(
const UInputAction* Action, |
Unmap a key from an action within the mapping context. | InputMappingContext.h |
|
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static bool ShouldShowInputModeQuery() |
UFUNCTION helper to be used as en edit condition for displaying input mode query releated properties. | InputMappingContext.h |