UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
IConsoleManager Struct Referenceabstract

#include <IConsoleManager.h>

+ Inheritance diagram for IConsoleManager:

Public Member Functions

virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, bool DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, int32 DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, float DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const TCHAR *DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariable (const TCHAR *Name, const FString &DefaultValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, bool &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, int32 &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, float &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, FString &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableRef (const TCHAR *Name, FName &RefValue, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleVariableRegisterConsoleVariableBitRef (const TCHAR *CVarName, const TCHAR *FlagName, uint32 BitNumber, uint8 *Force0MaskPtr, uint8 *Force1MaskPtr, const TCHAR *Help, uint32 Flags=ECVF_Default)=0
 
virtual void CallAllConsoleVariableSinks ()=0
 
virtual FConsoleVariableSinkHandle RegisterConsoleVariableSink_Handle (const FConsoleCommandDelegate &Command)=0
 
virtual void UnregisterConsoleVariableSink_Handle (FConsoleVariableSinkHandle Handle)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldAndArgsDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, const FConsoleCommandWithOutputDeviceDelegate &Command, uint32 Flags=ECVF_Default)=0
 
virtual IConsoleCommandRegisterConsoleCommand (const TCHAR *Name, const TCHAR *Help, uint32 Flags=(uint32) ECVF_Default)=0
 
virtual void UnregisterConsoleObject (IConsoleObject *ConsoleObject, bool bKeepState=true)=0
 
virtual void UnregisterConsoleObject (const TCHAR *Name, bool bKeepState=true)=0
 
virtual IConsoleVariableFindConsoleVariable (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 
virtual IConsoleObjectFindConsoleObject (const TCHAR *Name, bool bTrackFrequentCalls=true) const =0
 
virtual FString FindConsoleObjectName (const IConsoleObject *Obj) const =0
 
TConsoleVariableData< bool > * FindTConsoleVariableDataBool (const TCHAR *Name) const
 
TConsoleVariableData< int32 > * FindTConsoleVariableDataInt (const TCHAR *Name) const
 
TConsoleVariableData< float > * FindTConsoleVariableDataFloat (const TCHAR *Name) const
 
virtual void ForEachConsoleObjectThatStartsWith (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatStartsWith=TEXT("")) const =0
 
virtual void ForEachConsoleObjectThatContains (const FConsoleObjectVisitor &Visitor, const TCHAR *ThatContains) const =0
 
virtual bool ProcessUserConsoleInput (const TCHAR *Input, FOutputDevice &Ar, UWorld *InWorld)=0
 
virtual void AddConsoleHistoryEntry (const TCHAR *Key, const TCHAR *Input)=0
 
virtual void GetConsoleHistory (const TCHAR *Key, TArray< FString > &Out)=0
 
virtual bool IsNameRegistered (const TCHAR *Name) const =0
 
virtual void RegisterThreadPropagation (uint32 ThreadId=0, IConsoleThreadPropagation *InCallback=0)=0
 
virtual void UnsetAllConsoleVariablesWithTag (FName Tag, EConsoleVariableFlags Priority=ECVF_SetByMask)=0
 
virtual void BatchUpdateTag (FName Tag, const TMap< FName, FString > &CVarsAndValues)=0
 
virtual FConsoleVariableMulticastDelegateOnCVarUnregistered ()=0
 
virtual FConsoleObjectWithNameMulticastDelegateOnConsoleObjectUnregistered ()=0
 

Static Public Member Functions

static IConsoleManagerGet ()
 

Protected Member Functions

virtual ~IConsoleManager ()
 

Detailed Description

handles console commands and variables, registered console variables are released on destruction

Constructor & Destructor Documentation

◆ ~IConsoleManager()

virtual IConsoleManager::~IConsoleManager ( )
inlineprotectedvirtual

Member Function Documentation

◆ AddConsoleHistoryEntry()

virtual void IConsoleManager::AddConsoleHistoryEntry ( const TCHAR Key,
const TCHAR Input 
)
pure virtual
Parameters
Input- must not be 0

Implemented in FConsoleManager.

◆ BatchUpdateTag()

virtual void IConsoleManager::BatchUpdateTag ( FName  Tag,
const TMap< FName, FString > &  CVarsAndValues 
)
pure virtual

Add, replace, or remove cvars to match the passed in cvars

Implemented in FConsoleManager.

◆ CallAllConsoleVariableSinks()

virtual void IConsoleManager::CallAllConsoleVariableSinks ( )
pure virtual

The sinks are only called if a change has been done since the last time Should be called in very few points:

  • after ini file loading
  • after user console input
  • user initiated a console variable change (it needs to be clear to user that a cvar can change e.g. game options menu)
  • beginning of Tick (to catch stray Set() calls, which are usually bad)

Implemented in FConsoleManager.

◆ FindConsoleObject()

virtual IConsoleObject * IConsoleManager::FindConsoleObject ( const TCHAR Name,
bool  bTrackFrequentCalls = true 
) const
pure virtual

Find a console variable or command

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implemented in FConsoleManager.

◆ FindConsoleObjectName()

virtual FString IConsoleManager::FindConsoleObjectName ( const IConsoleObject Obj) const
pure virtual

Lookup the name of a console object by its pointer

Parameters
Objectto lookup. Must not be null.
Returns
Name of the object, or an empty string if the object can't be found

Implemented in FConsoleManager.

◆ FindConsoleVariable()

virtual IConsoleVariable * IConsoleManager::FindConsoleVariable ( const TCHAR Name,
bool  bTrackFrequentCalls = true 
) const
pure virtual

Find a console variable

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

Implemented in FConsoleManager.

◆ FindTConsoleVariableDataBool()

TConsoleVariableData< bool > * IConsoleManager::FindTConsoleVariableDataBool ( const TCHAR Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

◆ FindTConsoleVariableDataFloat()

TConsoleVariableData< float > * IConsoleManager::FindTConsoleVariableDataFloat ( const TCHAR Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

◆ FindTConsoleVariableDataInt()

TConsoleVariableData< int32 > * IConsoleManager::FindTConsoleVariableDataInt ( const TCHAR Name) const
inline

Find a typed console variable (faster access to the value, no virtual function call)

Parameters
Namemust not be 0
Returns
0 if the object wasn't found

◆ ForEachConsoleObjectThatContains()

virtual void IConsoleManager::ForEachConsoleObjectThatContains ( const FConsoleObjectVisitor Visitor,
const TCHAR ThatContains 
) const
pure virtual

Not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatContainsmust not be 0

Implemented in FConsoleManager.

◆ ForEachConsoleObjectThatStartsWith()

virtual void IConsoleManager::ForEachConsoleObjectThatStartsWith ( const FConsoleObjectVisitor Visitor,
const TCHAR ThatStartsWith = TEXT("") 
) const
pure virtual

Iterate in O(n), not case sensitive, does not guarantee that UnregisterConsoleObject() will work in the loop

Parameters
Visitormust not be 0
ThatStartsWithmust not be 0

Implemented in FConsoleManager.

◆ Get()

static IConsoleManager & IConsoleManager::Get ( )
inlinestatic

Returns the singleton for the console manager

◆ GetConsoleHistory()

virtual void IConsoleManager::GetConsoleHistory ( const TCHAR Key,
TArray< FString > &  Out 
)
pure virtual

Implemented in FConsoleManager.

◆ IsNameRegistered()

virtual bool IConsoleManager::IsNameRegistered ( const TCHAR Name) const
pure virtual

Check if a name (command or variable) has been registered with the console manager

Parameters
Name- Name to check. Must not be 0

Implemented in FConsoleManager.

◆ OnConsoleObjectUnregistered()

virtual FConsoleObjectWithNameMulticastDelegate & IConsoleManager::OnConsoleObjectUnregistered ( )
pure virtual

Implemented in FConsoleManager.

◆ OnCVarUnregistered()

virtual FConsoleVariableMulticastDelegate & IConsoleManager::OnCVarUnregistered ( )
pure virtual

Implemented in FConsoleManager.

◆ ProcessUserConsoleInput()

virtual bool IConsoleManager::ProcessUserConsoleInput ( const TCHAR Input,
FOutputDevice Ar,
UWorld InWorld 
)
pure virtual

Process user input e.g. "MyCVar" to get the current value of the console variable "MyCVar -5.2" to set the value to -5.2 "MyCVar ?" to get the help text

Parameters
Inputmust not be 0
Ararchive
InWorldworld context
Returns
true if the command was recognized

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [1/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes no arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [2/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithArgsAndOutputDeviceDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [3/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithArgsDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [4/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithOutputDeviceDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [5/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithWorldAndArgsDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [6/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithWorldArgsAndOutputDeviceDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [7/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
const FConsoleCommandWithWorldDelegate Command,
uint32  Flags = ECVF_Default 
)
pure virtual

Register a console command that takes arguments

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
CommandThe user function to call when this command is executed
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleCommand() [8/8]

virtual IConsoleCommand * IConsoleManager::RegisterConsoleCommand ( const TCHAR Name,
const TCHAR Help,
uint32  Flags = (uint32ECVF_Default 
)
pure virtual

Register a console command that is handles by an Exec functions (for auto completion)

Parameters
NameThe name of this command (must not be nullptr)
HelpHelp text for this command
FlagsOptional flags bitmask

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [1/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR Name,
bool  DefaultValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [2/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR Name,
const FString &  DefaultValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [3/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR Name,
const TCHAR DefaultValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [4/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR Name,
float  DefaultValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariable() [5/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariable ( const TCHAR Name,
int32  DefaultValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableBitRef()

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableBitRef ( const TCHAR CVarName,
const TCHAR FlagName,
uint32  BitNumber,
uint8 Force0MaskPtr,
uint8 Force1MaskPtr,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a show flag variable

Parameters
CVarNamemust not be 0, e.g. "Show.PostProcessing"
FlagNamemust not be 0, e.g. "PostProcessing"
BitNumberin the memory defined by Force0MaskPtr and Force1MaskPtr
Force0MaskPtrmemory that contains the bits that should be forced to 0
Force1MaskPtrmemory that contains the bits that should be forced to 1
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [1/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR Name,
bool RefValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a bool console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [2/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR Name,
float RefValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a float console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [3/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR Name,
FName RefValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a name console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [4/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR Name,
FString &  RefValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a string console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableRef() [5/5]

virtual IConsoleVariable * IConsoleManager::RegisterConsoleVariableRef ( const TCHAR Name,
int32 RefValue,
const TCHAR Help,
uint32  Flags = ECVF_Default 
)
pure virtual

Create a reference to a int console variable

Parameters
Namemust not be 0
Helpmust not be 0
Flagsbitmask combined from EConsoleVariableFlags

Implemented in FConsoleManager.

◆ RegisterConsoleVariableSink_Handle()

virtual FConsoleVariableSinkHandle IConsoleManager::RegisterConsoleVariableSink_Handle ( const FConsoleCommandDelegate Command)
pure virtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implemented in FConsoleManager.

◆ RegisterThreadPropagation()

virtual void IConsoleManager::RegisterThreadPropagation ( uint32  ThreadId = 0,
IConsoleThreadPropagation InCallback = 0 
)
pure virtual

Implemented in FConsoleManager.

◆ UnregisterConsoleObject() [1/2]

virtual void IConsoleManager::UnregisterConsoleObject ( const TCHAR Name,
bool  bKeepState = true 
)
pure virtual

Unregisters a console variable or command by name, if an object of that name was registered.

Parameters
Name- name of object to remove
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

◆ UnregisterConsoleObject() [2/2]

virtual void IConsoleManager::UnregisterConsoleObject ( IConsoleObject ConsoleObject,
bool  bKeepState = true 
)
pure virtual

Unregisters a console object, if that object was registered. O(n), n is the console object count

Parameters
ConsoleObject- object to remove
bKeepStateif the current state is kept in memory until a cvar with the same name is registered

Implemented in FConsoleManager.

◆ UnregisterConsoleVariableSink_Handle()

virtual void IConsoleManager::UnregisterConsoleVariableSink_Handle ( FConsoleVariableSinkHandle  Handle)
pure virtual

The registered command is executed at few defined points (see CallAllConsoleVariableSinks)

Parameters
Command

Implemented in FConsoleManager.

◆ UnsetAllConsoleVariablesWithTag()

virtual void IConsoleManager::UnsetAllConsoleVariablesWithTag ( FName  Tag,
EConsoleVariableFlags  Priority = ECVF_SetByMask 
)
pure virtual

When a plugin is unmounted, it needs to unset cvars that it had set when it was mounted. This will unset and fixup all variables with the given Tag

Parameters
PriorityIf set, then the internal search for CVars is restricted to this SetBy. This is an optimization, only to be used if you know that all CVars set with this tag were set at this priority. Any other priorites cannot be unset

Implemented in FConsoleManager.


The documentation for this struct was generated from the following files: