ULimenKeyBindSubsystem
Overview
The ULimenKeyBindSubsystem is a subsystem that manages input key bindings for players and pawns. It inherits from ULimenModularSettingsSubsystem and provides methods to get input mapping contexts based on player controller or pawn classes, as well as functions to retrieve and set action key mappings. The subsystem also handles the initialization of default settings and broadcasts updates when a key binding is applied.
Properties
Type | Name | Access | Description |
|---|---|---|---|
| SubsystemSettings | Private | Stores the developer settings for the subsystem. |
| PlayerMappingContexts | Private | Maps player controller classes to their respective input mapping contexts. |
| PawnMappingContexts | Private | Maps pawn classes to their respective input mapping contexts. |
| MappingContexts | Private | Array of strong pointers to all input mapping contexts managed by the subsystem. |
Functions
Return Type | Signature | Description |
|---|---|---|
| ShouldCreateSubsystem(UObject* Outer) const | Determines if the subsystem should be created based on the outer object and developer settings. |
| Initialize(FSubsystemCollectionBase& Collection) | Initializes the subsystem by loading default settings, creating input mapping contexts, and adding settings to the collection. |
| Deinitialize() | Cleans up resources when the subsystem is being destroyed. |
| Retrieves an input mapping context for a player controller class. | |
| Retrieves an input mapping context for a pawn class. | |
| Retrieves an input mapping context for a specific player controller instance. | |
| Retrieves an input mapping context for a specific pawn instance. | |
| Retrieves an input mapping context for a player controller class. | |
| Retrieves an input mapping context for a pawn class. | |
| Retrieves the input mapping context that contains a specific action key mapping. | |
| Retrieves the action key mapping for a specific action from any input mapping context. | |
| Sets the action key mapping for a specific action in all relevant input mapping contexts. | |
| Loads default settings from developer settings and initializes them. | |
| Broadcasts an update when a key binding is applied, providing the updated action key mapping. |
Usage & Implementation Notes
Threading Constraints: This subsystem operates on the game thread.
Replication Requirements: None.
Memory Lifetime Management: The subsystem manages the lifetime of input mapping contexts and settings through strong pointers.
Initialization Dependencies: Depends on
ULimenKeyBindDeveloperSettingsfor configuration.