UGantryInputMappingSubsystem
Adds and removes Enhanced Input mapping contexts on one local player, counting who holds each one.
Two experiences, such as a game mode and a DLC pack that extends it, may both add the same mapping context. The player gets it once, and it comes off only when the last of them removes it. The Add Input Mappings stage (UGantryExperienceStage_InputMappings) uses this for you. Call it yourself for contexts your own code turns on and off, such as a vehicle's controls.
Adding can also register the context for rebinding with Enhanced Input's player settings, so a key binding setting (UGantrySettingKeyBinding) can list and rebind its keys.
Gantry binds no actions. What an action does is up to your game.
- Inherits
ULocalPlayerSubsystem
Properties
| Property | Type | Default | Description |
|---|---|---|---|
Counts | TMap<TObjectPtr<UInputMappingContext> ,int32> | () |
Functions
AddMappingContext
Adds a mapping context to this player, or counts one more holder when it is already on.
| Pin | Type | Direction | Description |
|---|---|---|---|
Context | UInputMappingContext* | in | The mapping context. |
Priority = 0 | int32 | in | Higher wins where contexts map the same key. Only the first add sets it. |
bRegisterForRebinding = false | bool | in | Register it with Enhanced Input's player settings (when the project enables them). |
GetMappingContextCount
How many holders a context has on this player.
| Pin | Type | Direction | Description |
|---|---|---|---|
Context | UInputMappingContext* | in | The mapping context. |
| Return Value | int32 | out | The count; 0 when it is not on. |
RemoveMappingContext
Counts one holder fewer.
The context comes off the player when none are left.
| Pin | Type | Direction | Description |
|---|---|---|---|
Context | UInputMappingContext* | in | The mapping context. |