MEnhancedInputSubsystem
- Module
- Game
- Header
#include "Game/MEnhancedInputSubsystem.h"- Namespace
Mowo
Type aliases
| Alias | Description |
|---|---|
using FActionResolver = std::function<const InputActionAsset*(const FInputMappingEntry&)> |
Constructors
| Signature | Name | Description |
|---|---|---|
MEnhancedInputSubsystem() | MEnhancedInputSubsystem | |
~MEnhancedInputSubsystem() | ~MEnhancedInputSubsystem |
Public functions
| Returns | Name | Description |
|---|---|---|
void | Initialize | Defaults to the global InputActionSystem::Get() when actions is null. |
void | Shutdown | |
void | SetInputSystem | Moves the active mapping contexts to another input instance (a split-screen player's own): torn down on the old one, rebuilt on the new one, priorities kept. |
void | AddMappingContext | Higher priority contexts evaluate first (they sit on top of the stack). |
void | RemoveMappingContext | |
void | ClearMappingContexts | |
bool | HasMappingContext | |
size_t | GetMappingContextCount | |
void | RegisterActionAsset | An InputAction asset's own modifiers and triggers apply everywhere it is mapped. |
void | UnregisterActionAsset | |
void | PopulateContext | Mirrors one mapping context into a runtime context — actions, bindings, the referenced action asset's modifiers/triggers, then the per-mapping triggers. |
Function details
MEnhancedInputSubsystem
MEnhancedInputSubsystem()~MEnhancedInputSubsystem
~MEnhancedInputSubsystem()Initialize
void Initialize(InputActionSystem* actions = nullptr)Defaults to the global InputActionSystem::Get() when actions is null.
Shutdown
void Shutdown()SetInputSystem
void SetInputSystem(InputActionSystem* actions)Moves the active mapping contexts to another input instance (a split-screen player's own): torn down on the old one, rebuilt on the new one, priorities kept.
AddMappingContext
void AddMappingContext(const InputMappingContextAsset* imc, int32_t priority)Higher priority contexts evaluate first (they sit on top of the stack).
RemoveMappingContext
void RemoveMappingContext(const InputMappingContextAsset* imc)ClearMappingContexts
void ClearMappingContexts()HasMappingContext
bool HasMappingContext(const InputMappingContextAsset* imc) constGetMappingContextCount
size_t GetMappingContextCount() constRegisterActionAsset
void RegisterActionAsset(const InputActionAsset* action)An InputAction asset's own modifiers and triggers apply everywhere it is mapped. Rebuild resolves each mapping's .miaction through the AssetManager, then the active project's disk; a host with neither (tests, a headless server) registers the asset objects it built directly, matched by action name or source path.
UnregisterActionAsset
void UnregisterActionAsset(const InputActionAsset* action)PopulateContext
static void PopulateContext(const InputMappingContextAsset& imc, InputContext& ctx, const FActionResolver& resolveAction)Mirrors one mapping context into a runtime context — actions, bindings, the referenced action asset's modifiers/triggers, then the per-mapping triggers. Static so the editor's conflict check builds exactly the context the runtime evaluates. A null resolver applies no asset-level data.