Navigation
Unreal Engine C++ API Reference > Runtime > Engine > Engine
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- URuntimeOptionsBase
- UEOSSettings
References
Module | Engine |
Header | /Engine/Source/Runtime/Engine/Classes/Engine/RuntimeOptionsBase.h |
Include | #include "Engine/RuntimeOptionsBase.h" |
Syntax
UCLASS (Config=RuntimeOptions, BlueprintType, Abstract, MinimalAPI)
class URuntimeOptionsBase : public UObject
Remarks
URuntimeOptionsBase: Base class designed to be subclassed in your game.
Supports checking at runtime whether features are enabled/disabled, and changing configuration parameters via console cheats or startup commands.
Add new config properties to your subclasses which default to the desired normal state This can be adjusted via the development-only tools (command line or cvar) or via an override in the config hierarchy to adjust it as needed (e.g., via a hotfix).
In non-Shipping builds, each property will be exposed both as a console variable and as a command-line argument for easy testing during development.
Debug console syntax (disabled in Shipping configurations): prefix.PropertyName Value Command line syntax (disabled in Shipping configurations): -prefix.PropertyName=Value DefaultRuntimeOptions.ini syntax (note that there is no prefix for these): [/Script/YourModule.YourRuntimeOptionsSubclass] PropertyName=Value
Where the prefix is set by the value of OptionCommandPrefix (defaults to "ro" but can be overridden)
You can also change the name of the ini file that settings are gathered from in your derived UCLASS() declaration
Variables
Type | Name | Description | |
---|---|---|---|
![]() |
FString | OptionCommandPrefix | The command prefix for all options declared in a subclass (defaults to "ro", so a property named TestProp would be exposed as ro.TestProp) |
Constructors
Type | Name | Description | |
---|---|---|---|
![]() |
Functions
Type | Name | Description | |
---|---|---|---|
![]() |
void | Applies overrides from the command line. | |
![]() ![]() |
const TRuntimeOptionsSubclass & | Get () |
Returns the runtime options for the specified type, typically you will make a non-templated overload of Get in your subclass. |
![]() |
void | ||
![]() |
void | RegisterSupportedConsoleVariables
(
bool bDuringReload |
Overridden from UObject
Type | Name | Description | |
---|---|---|---|
![]() ![]() |
void | Called after the C++ constructor and after the properties have been initialized, including those loaded from config. | |
![]() ![]() |
void | PostReloadConfig
(
FProperty* PropertyThatWasLoaded |
Called from ReloadConfig after the object has reloaded its configuration data. |