Navigation
API > API/Plugins > API/Plugins/EnhancedInput
Inheritance Hierarchy
- UWorldSubsystem
- IEnhancedInputSubsystemInterface
- UEnhancedInputWorldSubsystem
References
| Module | EnhancedInput |
| Header | /Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/EnhancedInputSubsystems.h |
| Include | #include "EnhancedInputSubsystems.h" |
Syntax
UCLASS (DisplayName="Enhanced Input World Subsystem (Experimental)")
class UEnhancedInputWorldSubsystem :
public UWorldSubsystem,
public IEnhancedInputSubsystemInterface
Remarks
Per world input subsystem that allows you to bind input delegates to actors without an owning Player Controller. This should be used when an actor needs to receive input delegates but will never have an owning Player Controller. For example, you can add input delegates to unlock a door when the user has a certain set of keys pressed. Be sure to enable input on the actor, or else the input delegates won't fire!
Note: if you do have an actor with an owning Player Controller use the local player input subsystem instead.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TMap< TObjectPtr< const UInputAction >, FInjectedInput > | ContinuouslyInjectedInputs | Map of inputs that should be injected every frame. These inputs will be injected when ForcedInput is ticked. | |
| TArray< TWeakObjectPtr< UInputComponent > > | CurrentInputStack | Internal. This is the current stack of InputComponents that is being processed by the PlayerInput. | |
| TSharedPtr< FEnhancedInputWorldProcessor > | InputPreprocessor | Input processor that is created on Initalize. | |
| TObjectPtr< UEnhancedPlayerInput > | PlayerInput | The player input that is processing the input within this subsystem |
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | AddActorInputComponent
(
AActor* Actor |
Adds this Actor's input component onto the stack to be processed by this subsystem's tick function | |
| void | Adds all the default mapping contexts | ||
| void | Deinitialize () |
||
| bool | DoesSupportWorldType
(
const EWorldType::Type WorldType |
||
| void | Initialize
(
FSubsystemCollectionBase& Collection |
||
| bool | InputKey
(
const FInputKeyParams& Params |
Inputs a key on this subsystem's player input which can then be processed as normal during Tick. | |
| bool | RemoveActorInputComponent
(
AActor* Actor |
Removes this Actor's input component from the stack to be processed by this subsystem's tick function | |
| void | Removes all the default mapping contexts | ||
| bool | ShouldCreateSubsystem
(
UObject* Outer |
||
| void | TickPlayerInput
(
float DeltaTime |
Builds the current input stack and ticks the world subsystem's player input. |
Overridden from IEnhancedInputSubsystemInterface
| Type | Name | Description | |
|---|---|---|---|
| TMap< TObjectPtr< const UInputAction >, FInjectedInput > & | Pure-virtual getter for the map of inputs that should be injected every frame. | ||
| UEnhancedPlayerInput * | |||
| void | ShowDebugInfo
(
UCanvas* Canvas |
Debug visualization for enhanced input local player subsystem. |