EnhancedEditorInput.bAutomaticallyStartConsumingInput
EnhancedEditorInput.bAutomaticallyStartConsumingInput
#Overview
name: EnhancedEditorInput.bAutomaticallyStartConsumingInput
This variable is created as a Console Variable (cvar).
- type:
Var
- help:
Should the UEnhancedInputEditorSubsystem be started as soon as it is inialized?
It is referenced in 10
C++ source files.
#Summary
#Usage in the C++ source code
The purpose of EnhancedEditorInput.bAutomaticallyStartConsumingInput is to control whether the UEnhancedInputEditorSubsystem should automatically start consuming input as soon as it is initialized.
This setting variable is primarily used by the Enhanced Input plugin, which is part of Unreal Engine’s input system. Specifically, it affects the behavior of the UEnhancedInputEditorSubsystem within the editor environment.
The value of this variable is set in multiple places:
- It is defined as a console variable in the EnhancedInputEditorSettings.cpp file.
- It is declared as a property in the UEnhancedInputEditorSettings class in EnhancedInputEditorSettings.h.
- It is initialized to false in the UEnhancedInputEditorSettings constructor.
The main variable that interacts with it is bAutomaticallyStartConsumingInput, which is the associated variable sharing the same value.
Developers should be aware that this variable affects the editor’s behavior regarding input consumption. When set to true, the EnhancedInputEditorSubsystem will automatically start consuming input upon initialization, which may impact how input is handled in the editor.
Best practices when using this variable include:
- Consider the implications of automatically starting input consumption in the editor.
- Use it in conjunction with other Enhanced Input settings to achieve the desired input behavior in the editor.
- Be cautious when modifying this setting, as it may affect the editor’s responsiveness to input.
Regarding the associated variable bAutomaticallyStartConsumingInput:
- It serves the same purpose as EnhancedEditorInput.bAutomaticallyStartConsumingInput.
- It is used within the UEnhancedInputEditorSubsystem::Initialize function to determine whether to call StartConsumingInput().
- It is declared as a property in the UEnhancedInputEditorSettings class, allowing it to be configured in the editor settings.
- The same considerations and best practices apply to this variable as to the console variable version.
#References in C++ code
#Callsites
This variable is referenced in the following C++ source code:
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSettings.cpp:20
Scope (from outer to inner):
file
namespace UE::EnhancedInput::Private
namespace ConsoleVariables
Source code excerpt:
static bool bAutomaticallyStartConsumingInput = false;
static FAutoConsoleVariableRef CVarAutomaticallyStartConsumingInput(
TEXT("EnhancedEditorInput.bAutomaticallyStartConsumingInput"),
bAutomaticallyStartConsumingInput,
TEXT("Should the UEnhancedInputEditorSubsystem be started as soon as it is inialized?"),
ECVF_Default);
}
}
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Public/EnhancedInputEditorSettings.h:49
Scope (from outer to inner):
file
class class UEnhancedInputEditorSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
/** If true, then the UEnhancedInputEditorSubsystem will be started when it is initalized */
UPROPERTY(config, EditAnywhere, Category = Editor, meta=(ConsoleVariable="EnhancedEditorInput.bAutomaticallyStartConsumingInput"))
uint8 bAutomaticallyStartConsumingInput : 1;
/** A bitmask of what event pins are visible when you place an Input Action event node in blueprints. */
UPROPERTY(config, EditAnywhere, Category = Blueprints, meta = (Bitmask, BitmaskEnum = "/Script/EnhancedInput.ETriggerEvent"))
uint8 VisibleEventPinsByDefault;
};
#Associated Variable and Callsites
This variable is associated with another variable named bAutomaticallyStartConsumingInput
. They share the same value. See the following C++ source code.
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSettings.cpp:15
Scope (from outer to inner):
file
namespace UE::EnhancedInput::Private
namespace ConsoleVariables
Source code excerpt:
TEXT("EnhancedEditorInput.bShouldLogAllInputs"),
bShouldLogAllInputs,
TEXT("Should each InputKey call be logged?"),
ECVF_Default);
static bool bAutomaticallyStartConsumingInput = false;
static FAutoConsoleVariableRef CVarAutomaticallyStartConsumingInput(
TEXT("EnhancedEditorInput.bAutomaticallyStartConsumingInput"),
bAutomaticallyStartConsumingInput,
TEXT("Should the UEnhancedInputEditorSubsystem be started as soon as it is inialized?"),
ECVF_Default);
}
}
////////////////////////////////////////////////////////////////////////
// UEnhancedInputEditorProjectSettings
UEnhancedInputEditorProjectSettings::UEnhancedInputEditorProjectSettings(const FObjectInitializer& Initializer)
: Super(Initializer)
, DefaultEditorInputClass(UEnhancedPlayerInput::StaticClass())
{
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSettings.cpp:36
Scope (from outer to inner):
file
function UEnhancedInputEditorSettings::UEnhancedInputEditorSettings
Source code excerpt:
////////////////////////////////////////////////////////////////////////
// UEnhancedInputEditorSettings
UEnhancedInputEditorSettings::UEnhancedInputEditorSettings()
: bLogAllInput(false)
, bAutomaticallyStartConsumingInput(false)
// By default only show the triggered event
, VisibleEventPinsByDefault(static_cast<uint8>(ETriggerEvent::Triggered))
{
}
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSubsystem.cpp:38
Scope (from outer to inner):
file
function void UEnhancedInputEditorSubsystem::Initialize
Source code excerpt:
{
InputPreprocessor = MakeShared<FEnhancedInputEditorProcessor>();
FSlateApplication::Get().RegisterInputPreProcessor(InputPreprocessor, 0);
}
if (GetDefault<UEnhancedInputEditorSettings>()->bAutomaticallyStartConsumingInput)
{
StartConsumingInput();
}
}
void UEnhancedInputEditorSubsystem::Deinitialize()
{
Super::Deinitialize();
if (FSlateApplication::IsInitialized())
{
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Public/EnhancedInputEditorSettings.h:47
Scope (from outer to inner):
file
class class UEnhancedInputEditorSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = Logging, meta=(ConsoleVariable="EnhancedEditorInput.bShouldLogAllInputs"))
uint8 bLogAllInput : 1;
/** If true, then the UEnhancedInputEditorSubsystem will be started when it is initalized */
UPROPERTY(config, EditAnywhere, Category = Editor, meta=(ConsoleVariable="EnhancedEditorInput.bAutomaticallyStartConsumingInput"))
uint8 bAutomaticallyStartConsumingInput : 1;
/** A bitmask of what event pins are visible when you place an Input Action event node in blueprints. */
UPROPERTY(config, EditAnywhere, Category = Blueprints, meta = (Bitmask, BitmaskEnum = "/Script/EnhancedInput.ETriggerEvent"))
uint8 VisibleEventPinsByDefault;
};
#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
#include "CoreMinimal.h"
#include "EnhancedInputDeveloperSettings.h"
#endif
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSettings.cpp:15
Scope (from outer to inner):
file
namespace UE::EnhancedInput::Private
namespace ConsoleVariables
Source code excerpt:
TEXT("EnhancedEditorInput.bShouldLogAllInputs"),
bShouldLogAllInputs,
TEXT("Should each InputKey call be logged?"),
ECVF_Default);
static bool bAutomaticallyStartConsumingInput = false;
static FAutoConsoleVariableRef CVarAutomaticallyStartConsumingInput(
TEXT("EnhancedEditorInput.bAutomaticallyStartConsumingInput"),
bAutomaticallyStartConsumingInput,
TEXT("Should the UEnhancedInputEditorSubsystem be started as soon as it is inialized?"),
ECVF_Default);
}
}
////////////////////////////////////////////////////////////////////////
// UEnhancedInputEditorProjectSettings
UEnhancedInputEditorProjectSettings::UEnhancedInputEditorProjectSettings(const FObjectInitializer& Initializer)
: Super(Initializer)
, DefaultEditorInputClass(UEnhancedPlayerInput::StaticClass())
{
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSettings.cpp:36
Scope (from outer to inner):
file
function UEnhancedInputEditorSettings::UEnhancedInputEditorSettings
Source code excerpt:
////////////////////////////////////////////////////////////////////////
// UEnhancedInputEditorSettings
UEnhancedInputEditorSettings::UEnhancedInputEditorSettings()
: bLogAllInput(false)
, bAutomaticallyStartConsumingInput(false)
// By default only show the triggered event
, VisibleEventPinsByDefault(static_cast<uint8>(ETriggerEvent::Triggered))
{
}
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Private/EnhancedInputEditorSubsystem.cpp:38
Scope (from outer to inner):
file
function void UEnhancedInputEditorSubsystem::Initialize
Source code excerpt:
{
InputPreprocessor = MakeShared<FEnhancedInputEditorProcessor>();
FSlateApplication::Get().RegisterInputPreProcessor(InputPreprocessor, 0);
}
if (GetDefault<UEnhancedInputEditorSettings>()->bAutomaticallyStartConsumingInput)
{
StartConsumingInput();
}
}
void UEnhancedInputEditorSubsystem::Deinitialize()
{
Super::Deinitialize();
if (FSlateApplication::IsInitialized())
{
#Loc: <Workspace>/Engine/Plugins/EnhancedInput/Source/InputEditor/Public/EnhancedInputEditorSettings.h:47
Scope (from outer to inner):
file
class class UEnhancedInputEditorSettings : public UDeveloperSettingsBackedByCVars
Source code excerpt:
UPROPERTY(config, EditAnywhere, Category = Logging, meta=(ConsoleVariable="EnhancedEditorInput.bShouldLogAllInputs"))
uint8 bLogAllInput : 1;
/** If true, then the UEnhancedInputEditorSubsystem will be started when it is initalized */
UPROPERTY(config, EditAnywhere, Category = Editor, meta=(ConsoleVariable="EnhancedEditorInput.bAutomaticallyStartConsumingInput"))
uint8 bAutomaticallyStartConsumingInput : 1;
/** A bitmask of what event pins are visible when you place an Input Action event node in blueprints. */
UPROPERTY(config, EditAnywhere, Category = Blueprints, meta = (Bitmask, BitmaskEnum = "/Script/EnhancedInput.ETriggerEvent"))
uint8 VisibleEventPinsByDefault;
};
#if UE_ENABLE_INCLUDE_ORDER_DEPRECATED_IN_5_2
#include "CoreMinimal.h"
#include "EnhancedInputDeveloperSettings.h"
#endif