Navigation
API > API/Runtime > API/Runtime/Engine
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
| Name | URuntimeOptionsBase |
| Type | class |
| Header File | /Engine/Source/Runtime/Engine/Classes/Engine/RuntimeOptionsBase.h |
| Include Path | #include "Engine/RuntimeOptionsBase.h" |
Syntax
UCLASS (Config=RuntimeOptions, BlueprintType, Abstract, MinimalAPI)
class URuntimeOptionsBase : public UObject
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → URuntimeOptionsBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
URuntimeOptionsBase() |
Engine/RuntimeOptionsBase.h |
Functions
Public
Overridden from UObject
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void PostInitProperties() |
Engine/RuntimeOptionsBase.h | ||
virtual void PostReloadConfig
(
FProperty* PropertyThatWasLoaded |
Engine/RuntimeOptionsBase.h |
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void ApplyCommandlineOverrides() |
Applies overrides from the command line. | Engine/RuntimeOptionsBase.h | |
void InitializeRuntimeOptions() |
Engine/RuntimeOptionsBase.h | ||
void RegisterSupportedConsoleVariables
(
bool bDuringReload |
Engine/RuntimeOptionsBase.h |
Static
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
static const TRuntimeOptionsSubclass & Get() |
Returns the runtime options for the specified type, typically you will make a non-templated overload of Get in your subclass. | Engine/RuntimeOptionsBase.h |