class

IConsoleManager

Module
Core
Header
#include "Core/IConsoleManager.h"
Namespace
Mowo

Type aliases

AliasDescription
using FConsoleCommandHandler = std::function<void(const std::vector<std::string>& args)>Console COMMANDS, as opposed to variables: log LogRender Verbose, stat unit. A command owns its arguments — the manager only splits the line on whitespace and hands the tail over.

Public functions

ReturnsNameDescription
IConsoleManager&Get
TConsoleVariable<T>MakeConsoleVar
voidSetCheatsAllowedOff in release, on everywhere else.
boolAreCheatsAllowed
boolIsSettableFromOutsideWhether the console and the command line may write this cvar right now.
const char*DescribeSetBy
IConsoleVariable*FindByNamenullptr if not registered.
boolSetByNameParses value according to the cvar's runtime type, as setBy.
boolResetToDefaultByNameRestore the cvar to the default it registered with, and its source to Constructor, whoever set it.
voidForEach
voidApplyCommandLineArgsApply --cvar key=value entries from FCommandLine.
boolHasCommandLineCVarWhether the command line carries an explicit --cvar=<name>=....
voidApplyConfigApply every entry under the config's "cvars" section (dotted CVar names are reassembled from nested section nodes), plus [ConsoleVariables] and [ScalabilityGroups], as setBy.
voidRegisterCalled by the cvar's ctor.
size_tGetRememberedValueCountHow many remembered settings values wait for (or were replayed to) a cvar of this name.
voidUnregister
voidRegisterCommandowner names the registering module (see FModuleAnchor): its commands leave with it on unload instead of dangling into freed code.
voidUnregisterCommand
size_tRemoveCommandsInModule
boolHasCommand
voidForEachCommand
boolExecuteRun one console line.

Function details

Get

C++
static IConsoleManager& Get()

MakeConsoleVar

C++
template<typename T> static TConsoleVariable<T> MakeConsoleVar(const char* name, T defaultValue, const char* helpText, EConsoleVariableFlags flags = EConsoleVariableFlags::None)

SetCheatsAllowed

C++
static void SetCheatsAllowed(bool allowed)

Off in release, on everywhere else. A game can turn cheats on for a local session or an admin; the test harness turns them off to check the refusal on a build that is not release.

AreCheatsAllowed

C++
static bool AreCheatsAllowed()

IsSettableFromOutside

C++
static bool IsSettableFromOutside(const IConsoleVariable& var)

Whether the console and the command line may write this cvar right now. Execute and the command-line pass answer false for one that may not; a console UI asks here to say why.

DescribeSetBy

C++
static const char* DescribeSetBy(ECVarSetBy setBy)

FindByName

C++
IConsoleVariable* FindByName(std::string_view name) const

nullptr if not registered.

SetByName

C++
bool SetByName(std::string_view name, std::string_view value, ECVarSetBy setBy = ECVarSetBy::Code)

Parses value according to the cvar's runtime type, as setBy. False if the cvar isn't registered, the value does not parse, or a higher source holds the cvar. A settings source (Scalability, DeviceProfile, GameSetting, ProjectSetting) is also remembered, registered or not, and replayed when a cvar of that name registers — that is how a plugin's or a game module's cvar gets its INI value.

ResetToDefaultByName

C++
bool ResetToDefaultByName(std::string_view name)

Restore the cvar to the default it registered with, and its source to Constructor, whoever set it. False if the cvar isn't registered. Used when a settings tier drops an override so the live value follows, and by anything that hands a cvar back to automatic control ("-1 = follow the tier"). The remembered settings values for it are forgotten too.

ForEach

C++
void ForEach(const std::function<void(const std::string&, IConsoleVariable*)>& visitor) const

ApplyCommandLineArgs

C++
void ApplyCommandLineArgs()

Apply --cvar key=value entries from FCommandLine. Call after FCommandLine::Set + after every cvar has registered (typically late in Engine::Initialize).

HasCommandLineCVar

C++
static bool HasCommandLineCVar(std::string_view name)

Whether the command line carries an explicit --cvar=<name>=.... For code that force-sets a cvar after the command line has already been applied and must not silently outrank an explicit request. Answering this by re-running ApplyCommandLineArgs would work but re-fires every OTHER cvar's change callback at a point in startup it was not written for, which is a much bigger hammer than the question deserves.

ApplyConfig

C++
void ApplyConfig(const class Config& config, ECVarSetBy setBy = ECVarSetBy::ProjectSetting)

Apply every entry under the config's "cvars" section (dotted CVar names are reassembled from nested section nodes), plus [ConsoleVariables] and [ScalabilityGroups], as setBy.

Register

C++
void Register(const std::string& name, IConsoleVariable* var)

Called by the cvar's ctor. The caller retains ownership. Registration replays the remembered settings values for the name (lowest source first), then any --cvar=<name>=... the command line carries: a cvar created after the INI pass or ApplyCommandLineArgs — every plugin, the game module, the lazily registered sg.* groups — otherwise ignored both and said nothing about it.

GetRememberedValueCount

C++
size_t GetRememberedValueCount(std::string_view name) const

How many remembered settings values wait for (or were replayed to) a cvar of this name. Diagnostics and tests.

Unregister

C++
void Unregister(IConsoleVariable* var)

RegisterCommand

C++
void RegisterCommand(const std::string& name, const std::string& helpText, FConsoleCommandHandler handler, const void* owner = FModuleAnchor::Here())

owner names the registering module (see FModuleAnchor): its commands leave with it on unload instead of dangling into freed code.

UnregisterCommand

C++
void UnregisterCommand(std::string_view name)

RemoveCommandsInModule

C++
size_t RemoveCommandsInModule(void* moduleHandle)

HasCommand

C++
bool HasCommand(std::string_view name) const

ForEachCommand

C++
void ForEachCommand(const std::function<void(const std::string&, const std::string&)>& visitor) const

Execute

C++
bool Execute(std::string_view line)

Run one console line. A registered command wins; otherwise the line is read as name value (or bare name to print) against the cvars, so the two namespaces stay reachable through a single entry point. False when nothing matched.

Generated from Core/IConsoleManager.h via core.json · Nov 5, 2026Version 1.0.0