Header <EnhancedInputComponent.h>

#include "EnhancedInputComponent.h"
Module: EnhancedInput Source: Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/EnhancedInputComponent.h

Includes 2

<Components/InputComponent.h>
<InputAction.h>

Contents

UEnhancedInputComponent
Implement an Actor component for input bindings.
(uclass class : UInputComponent)
Functions1 free functions
(namespace scope)

class UEnhancedInputComponent

class UEnhancedInputComponent : public UInputComponentUCLASSMinimalAPItransientconfig=Inputhidecategories=(Activation, Components|Activation)
Implement an Actor component for input bindings.

Member functions 22

SetShouldFireDelegatesInEditor
void SetShouldFireDelegatesInEditor(const bool bInNewValue);
ShouldFireDelegatesInEditor
bool ShouldFireDelegatesInEditor() const;
HasBindings
virtual bool HasBindings() const override;
Checks whether this component has any input bindings.
ClearActionEventBindings
void ClearActionEventBindings();
Removes all action bindings.
ClearActionValueBindings
void ClearActionValueBindings();
ClearDebugKeyBindings
void ClearDebugKeyBindings();
ClearActionBindings
virtual void ClearActionBindings() override;
Removes all action bindings.
ClearBindingsForObject
virtual void ClearBindingsForObject(UObject* InOwner) override;
Clears any input callback delegates from the given UObject
GetActionEventBindings
const TArray<TUniquePtr<FEnhancedInputActionEventBinding>>& GetActionEventBindings() const;
Gets all action bindings of type
GetActionValueBindings
const TArray<FEnhancedInputActionValueBinding>& GetActionValueBindings() const;
GetDebugKeyBindings
const TArray<TUniquePtr<FInputDebugKeyBinding>>& GetDebugKeyBindings() const;
RemoveActionEventBinding
bool RemoveActionEventBinding(const int32 BindingIndex);
Removes the action binding at the specified index.
RemoveDebugKeyBinding
bool RemoveDebugKeyBinding(const int32 BindingIndex);
RemoveActionValueBinding
bool RemoveActionValueBinding(const int32 BindingIndex);
RemoveBindingByHandle
bool RemoveBindingByHandle(const uint32 Handle);
Removes the binding with the specified handle. Binding handles are unique across all bindings.
RemoveBinding
bool RemoveBinding(const FInputBindingHandle& BindingToRemove);
Removes an arbitrary binding
BindAction
template<class UserClass, typename... VarTypes> FEnhancedInputActionEventBinding& BindAction(const UInputAction* Action, ETriggerEvent TriggerEvent, UserClass* Object, typename FEnhancedInputActionHandlerSignature::template TMethodPtr<UserClass, VarTypes...> Func, VarTypes... Vars);
template<class UserClass, typename... VarTypes> FEnhancedInputActionEventBinding& BindAction(const UInputAction* Action, ETriggerEvent TriggerEvent, UserClass* Object, typename FEnhancedInputActionHandlerValueSignature::template TMethodPtr<UserClass, VarTypes...> Func, VarTypes... Vars);
template<class UserClass, typename... VarTypes> FEnhancedInputActionEventBinding& BindAction(const UInputAction* Action, ETriggerEvent TriggerEvent, UserClass* Object, typename FEnhancedInputActionHandlerInstanceSignature::template TMethodPtr<UserClass, VarTypes...> Func, VarTypes... Vars);
FEnhancedInputActionEventBinding& BindAction(const UInputAction* Action, ETriggerEvent TriggerEvent, UObject* Object, FName FunctionName);
Binds a delegate function matching any of the handler signatures to a UInputAction assigned via UInputMappingContext to the owner of this component.
BindActionValueLambda
template<typename FunctorType, typename... VarTypes> FEnhancedInputActionEventBinding& BindActionValueLambda(const UInputAction* Action, ETriggerEvent TriggerEvent, FunctorType&& InFunctor, VarTypes&&... Vars);
Binds a lambda expression to receive the input action value form an input event. Example: InputComponent->BindActionValueLambda( TestAction, ETriggerEvent::Triggered, [](const FInputActionValue& InputActionValue) {…
BindActionInstanceLambda
template<typename FunctorType, typename... VarTypes> FEnhancedInputActionEventBinding& BindActionInstanceLambda(const UInputAction* Action, ETriggerEvent TriggerEvent, FunctorType&& InFunctor, VarTypes&&... Vars);
Bind a lambda to receive the action instance data from an input event. Example: InputComponent->BindActionInstanceLambda( TestAction, ETriggerEvent::Triggered, [](const FInputActionInstance& ActionInstance) { // Do…
BindActionValue
FEnhancedInputActionValueBinding& BindActionValue(const UInputAction* Action);
Binds a UInputAction assigned via UInputMappingContext to this component. No delegate will be called when this action triggers. The binding simply reflects the current value of the action.
BindDebugKey
template<class UserClass> FInputDebugKeyBinding& BindDebugKey(const FInputChord Chord, const EInputEvent KeyEvent, UserClass* Object, typename FInputDebugKeyHandlerSignature::TMethodPtr<UserClass> Func, bool bExecuteWhenPaused = true);
FInputDebugKeyBinding& BindDebugKey(const FInputChord Chord, const EInputEvent KeyEvent, UObject* Object, FName FunctionName, bool bExecuteWhenPaused = true);
Binds a chord event to a delegate function in development builds only.
GetBoundActionValue
FInputActionValue GetBoundActionValue(const UInputAction* Action) const;UFUNCTIONBlueprintCallable
Helper function to pull the action value for a bound action value.

Functions

Free functions 1

Execute
template<> inline void FEnhancedInputActionEventDelegateBinding<FEnhancedInputActionHandlerSignature>::Execute(const FInputActionInstance& ActionData) const;
template<> inline void FEnhancedInputActionEventDelegateBinding<FEnhancedInputActionHandlerValueSignature>::Execute(const FInputActionInstance& ActionData) const;
template<> inline void FEnhancedInputActionEventDelegateBinding<FEnhancedInputActionHandlerInstanceSignature>::Execute(const FInputActionInstance& ActionData) const;
template<> inline void FEnhancedInputActionEventDelegateBinding<FEnhancedInputActionHandlerDynamicSignature>::Execute(const FInputActionInstance& ActionData) const;
Action event delegate execution by signature.