EnhancedInput.OnlyTriggerLastActionInChord
EnhancedInput.OnlyTriggerLastActionInChord
#Overview
name: EnhancedInput.OnlyTriggerLastActionInChord
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Should only the last action in a ChordedAction trigger be fired? If this is disabled, then the dependant chords will be fired as well
It is referenced in 4
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of EnhancedInput.OnlyTriggerLastActionInChord is to control the behavior of chorded actions in the Enhanced Input system. It determines whether only the last action in a chorded action sequence should be triggered or if dependent chords should also be fired.
This setting variable is part of the Enhanced Input plugin, which is an improved input handling system for Unreal Engine. It primarily affects the input processing subsystem within this plugin.
The value of this variable is set through a console variable (CVar) named “EnhancedInput.OnlyTriggerLastActionInChord”. It is initialized in the EnhancedPlayerInput.cpp file with a default value of 1 (true).
This variable interacts with the associated variable bShouldOnlyTriggerLastActionInChord
, which is a member of the UEnhancedInputDeveloperSettings class. They share the same value, with bShouldOnlyTriggerLastActionInChord
being the configurable property in the developer settings.
Developers must be aware that:
- This setting affects how chorded actions are processed in their game.
- When set to true (default), only the last action in a chorded sequence will be triggered.
- When set to false, dependent chords will also be fired.
Best practices when using this variable include:
- Consider the desired behavior for chorded actions in your game before changing this setting.
- Test thoroughly after changing this value to ensure input behavior meets your game’s requirements.
- Document any changes to this setting for your development team.
Regarding the associated variable bShouldOnlyTriggerLastActionInChord
:
- Its purpose is to provide a configurable setting in the Enhanced Input Developer Settings.
- It is part of the UEnhancedInputDeveloperSettings class in the Enhanced Input plugin.
- The value is set in the constructor of UEnhancedInputDeveloperSettings with a default of true.
- It is defined as a bitfield (uint8) in the header file, allowing for compact storage.
- This variable is directly linked to the console variable “EnhancedInput.OnlyTriggerLastActionInChord” through the meta tag in its UPROPERTY declaration.
When working with bShouldOnlyTriggerLastActionInChord
, developers should:
- Access and modify this setting through the Enhanced Input Developer Settings in the Unreal Engine editor.
- Be aware that changes to this setting will affect the behavior of chorded actions throughout the game.
- Ensure that the setting is consistent across different development environments and builds.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/EnhancedPlayerInput.cpp:18
Scope (from outer to inner):
file
namespace UE
namespace Input
Source code excerpt:
{
static int32 ShouldOnlyTriggerLastActionInChord = 1;
static FAutoConsoleVariableRef CVarShouldOnlyTriggerLastActionInChord(TEXT("EnhancedInput.OnlyTriggerLastActionInChord"),
ShouldOnlyTriggerLastActionInChord,
TEXT("Should only the last action in a ChordedAction trigger be fired? If this is disabled, then the dependant chords will be fired as well"));
static int32 EnableDefaultMappingContexts = 1;
static FAutoConsoleVariableRef CVarEnableDefaultMappingContexts(TEXT("EnhancedInput.EnableDefaultMappingContexts"),
EnableDefaultMappingContexts,
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/EnhancedInputDeveloperSettings.h:115
Scope (from outer to inner):
file
class class UEnhancedInputDeveloperSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
* Default value is true.
*/
UPROPERTY(config, EditAnywhere, Category = "Enhanced Input", meta=(ConsoleVariable="EnhancedInput.OnlyTriggerLastActionInChord"))
uint8 bShouldOnlyTriggerLastActionInChord : 1;
/**
* If true, then a warning will be logged when a UPlayerMappableInputConfig that has been marked as deprecated is used.
*/
UPROPERTY(config, EditAnywhere, Category = "Enhanced Input")
#Associated Variable and Callsites
This variable is associated with another variable named bShouldOnlyTriggerLastActionInChord
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Private/EnhancedInputDeveloperSettings.cpp:29
Scope (from outer to inner):
file
function UEnhancedInputDeveloperSettings::UEnhancedInputDeveloperSettings
Source code excerpt:
, bEnableUserSettings(false)
, bEnableDefaultMappingContexts(true)
, bShouldOnlyTriggerLastActionInChord(true)
, bLogOnDeprecatedConfigUsed(true)
, bEnableWorldSubsystem(false)
, bShouldLogAllWorldSubsystemInputs(false)
{
PlatformSettings.Initialize(UEnhancedInputPlatformSettings::StaticClass());
}
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/EnhancedInput/Public/EnhancedInputDeveloperSettings.h:116
Scope (from outer to inner):
file
class class UEnhancedInputDeveloperSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
*/
UPROPERTY(config, EditAnywhere, Category = "Enhanced Input", meta=(ConsoleVariable="EnhancedInput.OnlyTriggerLastActionInChord"))
uint8 bShouldOnlyTriggerLastActionInChord : 1;
/**
* If true, then a warning will be logged when a UPlayerMappableInputConfig that has been marked as deprecated is used.
*/
UPROPERTY(config, EditAnywhere, Category = "Enhanced Input")
uint8 bLogOnDeprecatedConfigUsed : 1;