Header <Components/InputComponent.h>

#include "Components/InputComponent.h"
Module: Engine Source: Engine/Source/Runtime/Engine/Classes/Components/InputComponent.h

Includes 5

<CoreMinimal.h>
<UObject/ObjectMacros.h>
<InputCoreTypes.h>
<Components/ActorComponent.h>
<Framework/Commands/InputChord.h>

Contents

UInputComponent
Implement an Actor component for input bindings.
(uclass class : UActorComponent)

class UInputComponent

class UInputComponent : public UActorComponentUCLASSNotBlueprintabletransientconfig=Inputhidecategories=(Activation, Components|Activation)MinimalAPI
Implement an Actor component for input bindings.

Member functions 23

ClearBindingsForObject
virtual void ClearBindingsForObject(UObject* InOwner);
Clears any input callback delegates from the given UObject
ConditionalBuildKeyMap
void ConditionalBuildKeyMap(UPlayerInput* PlayerInput);
GetAxisValue
float GetAxisValue(const FName AxisName) const;
Gets the current value of the axis with the specified name.
GetAxisKeyValue
float GetAxisKeyValue(const FKey AxisKey) const;
Gets the current value of the axis with the specified key.
GetVectorAxisValue
FVector GetVectorAxisValue(const FKey AxisKey) const;
Gets the current vector value of the axis with the specified key.
HasBindings
virtual bool HasBindings() const;
Checks whether this component has any input bindings.
AddActionBinding
FInputActionBinding& AddActionBinding(FInputActionBinding Binding);
Adds the specified action binding.
ClearActionBindings
virtual void ClearActionBindings();
Removes all action bindings.
GetActionBinding
FInputActionBinding& GetActionBinding(const int32 BindingIndex) const;
Gets the action binding with the specified index.
GetNumActionBindings
int32 GetNumActionBindings() const;
Gets the number of action bindings.
RemoveActionBinding
void RemoveActionBinding(const int32 BindingIndex);
void RemoveActionBinding(FName ActionName, EInputEvent KeyEvent);
void RemoveActionBinding(const FInputActionBinding &BindingToRemove, const int32 BindingIndex);
Removes the action binding at the specified index.
RemoveActionBindingForHandle
void RemoveActionBindingForHandle(const int32 Handle);
Removes the action binding at the specified handle.
ClearBindingValues
void ClearBindingValues();
Clears all cached binding values.
BindAction
template<class UserClass> FInputActionBinding& BindAction(const FName ActionName, const EInputEvent KeyEvent, UserClass* Object, typename FInputActionHandlerSignature::TMethodPtr<UserClass> Func);
template<class UserClass> FInputActionBinding& BindAction(const FName ActionName, const EInputEvent KeyEvent, UserClass* Object, typename FInputActionHandlerWithKeySignature::TMethodPtr<UserClass> Func);
template<class DelegateType, class UserClass, typename... VarTypes> FInputActionBinding& BindAction(const FName ActionName, const EInputEvent KeyEvent, UserClass* Object, typename DelegateType::template TMethodPtr<UserClass> Func, VarTypes... Vars);
Binds a delegate function to an Action defined in the project settings. Returned reference is only guaranteed to be valid until another action is bound.
BindAxis
template<class UserClass> FInputAxisBinding& BindAxis(const FName AxisName, UserClass* Object, typename FInputAxisHandlerSignature::TMethodPtr<UserClass> Func);
FInputAxisBinding& BindAxis(const FName AxisName);
Binds a delegate function an Axis defined in the project settings. Returned reference is only guaranteed to be valid until another axis is bound.
RemoveAxisBinding
void RemoveAxisBinding(const FName AxisName);
Removes the axis binding with the specified name.
ClearAxisBindings
void ClearAxisBindings();
Removes all axis bindings.
BindAxisKey
template<class UserClass> FInputAxisKeyBinding& BindAxisKey(const FKey AxisKey, UserClass* Object, typename FInputAxisHandlerSignature::TMethodPtr<UserClass> Func);
FInputAxisKeyBinding& BindAxisKey(const FKey AxisKey);
Binds a delegate function for an axis key (e.g. Mouse X). Returned reference is only guaranteed to be valid until another axis key is bound.
RemoveAxisKeyBinding
void RemoveAxisKeyBinding(const FKey AxisKey);
Removes the axis key binding with the specified key.
BindVectorAxis
template<class UserClass> FInputVectorAxisBinding& BindVectorAxis(const FKey AxisKey, UserClass* Object, typename FInputVectorAxisHandlerSignature::TMethodPtr<UserClass> Func);
FInputVectorAxisBinding& BindVectorAxis(const FKey AxisKey);
Binds a delegate function to a vector axis key (e.g. Tilt) Returned reference is only guaranteed to be valid until another vector axis key is bound.
BindKey
template<class UserClass> FInputKeyBinding& BindKey(const FInputChord Chord, const EInputEvent KeyEvent, UserClass* Object, typename FInputActionHandlerSignature::TMethodPtr<UserClass> Func);
template<class UserClass> FInputKeyBinding& BindKey(const FKey Key, const EInputEvent KeyEvent, UserClass* Object, typename FInputActionHandlerSignature::TMethodPtr<UserClass> Func);
template <class UserClass> FInputKeyBinding& BindKey(const FKey Key, const EInputEvent KeyEvent, UserClass* Object, typename FInputActionHandlerWithKeySignature::TMethodPtr<UserClass> Func);
Binds a chord event to a delegate function. Returned reference is only guaranteed to be valid until another input key is bound.
BindTouch
template<class UserClass> FInputTouchBinding& BindTouch(const EInputEvent KeyEvent, UserClass* Object, typename FInputTouchHandlerSignature::TMethodPtr<UserClass> Func);
Binds this input component to touch events. Returned reference is only guaranteed to be valid until another touch event is bound.
BindGesture
template<class UserClass> FInputGestureBinding& BindGesture(const FKey GestureKey, UserClass* Object, typename FInputGestureHandlerSignature::TMethodPtr<UserClass> Func);
Binds a gesture event to a delegate function. Returned reference is only guaranteed to be valid until another gesture event is bound.