UInputMappingContext

[UInputMappingContext](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).

Choose your operating system:

Windows

macOS

Linux

Inheritance Hierarchy

References

Module

EnhancedInput

Header

/Engine/Plugins/Experimental/EnhancedInput/Source/EnhancedInput/Public/InputMappingContext.h

Include

#include "InputMappingContext.h"

Syntax

UCLASS(BlueprintType, Config=Input)
class UInputMappingContext : public UDataAsset

Remarks

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)

Variables

Name Description

Public variable UProperty Category, EditAnywhere BlueprintReadOnly displayname

FText

 

ContextDescription

Localized context descriptor.

Protected variable UProperty Category, EditAnywhere BlueprintReadOnly Config

TArray< FEnhanc...

 

Mappings

List of key to action mappings.

Functions

Name Description

Public function

FEnhancedAct...

 

GetMapping

Public function Const

const TArray...

 

GetMappings()

Mapping accessors.

Public function UFunction BlueprintCallable, Category

FEnhancedAct...

 

MapKey

(
    const UInputAction* Action,
    FKey ToKey
)

Map a key to an action within the mapping context.

Public function UFunction BlueprintCallable, Category

void

 

UnmapAction

(
    const UInputAction* Action
)

Unmap all key maps to an action within the mapping context.

Public function UFunction BlueprintCallable, Category

void

 

UnmapAll()

Unmap everything within the mapping context.

Public function UFunction BlueprintCallable, Category

void

 

UnmapKey

(
    const UInputAction* Action,
    FKey Key
)

Unmap a key from an action within the mapping context.