unreal.InputMappingContext
¶
- class unreal.InputMappingContext(outer=None, name='None')¶
Bases:
unreal.DataAsset
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)
C++ Source:
Plugin: EnhancedInput
Module: EnhancedInput
File: InputMappingContext.h
Editor Properties: (see get_editor_property/set_editor_property)
context_description
(Text): [Read-Write] Localized context descriptormappings
(Array(EnhancedActionKeyMapping)): [Read-Write] List of key to action mappings.
- map_key(action, to_key) → EnhancedActionKeyMapping¶
Map a key to an action within the mapping context.
- Parameters
action (InputAction) –
to_key (Key) –
- Returns
- Return type
- property mappings¶
[Read-Only] List of key to action mappings.
- Type
- unmap_action(action) → None¶
Unmap all key maps to an action within the mapping context.
- Parameters
action (InputAction) –
- unmap_key(action, key) → None¶
Unmap a key from an action within the mapping context.
- Parameters
action (InputAction) –
key (Key) –