![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <AutomationCommon.h>
Public Member Functions | |
| ENGINE_API | FTestConsoleVariable (const FString &InConsoleVariableName) |
| ENGINE_API | FTestConsoleVariable (FTestConsoleVariable &&Other) |
| ENGINE_API | ~FTestConsoleVariable () |
| ENGINE_API void | Set (const FString &Value) |
| ENGINE_API FString | Get () |
| ENGINE_API void | Restore () |
Utility for setting and restoring of a Console Variable (CVar).
Note that race conditions are possible when multiple FTestConsoleVariable objects refer to the same Console Variable and get restored/destroyed in an order different than they were set. Please use FScopedTestEnvironment to manage multiple FTestConsoleVariable objects.
| FTestConsoleVariable::FTestConsoleVariable | ( | const FString & | InConsoleVariableName | ) |
| FTestConsoleVariable::FTestConsoleVariable | ( | FTestConsoleVariable && | Other | ) |
| FTestConsoleVariable::~FTestConsoleVariable | ( | ) |
| FString FTestConsoleVariable::Get | ( | ) |
Returns the current value of the Console Variable
| void FTestConsoleVariable::Restore | ( | ) |
Returns the Console Variable to the original value
| void FTestConsoleVariable::Set | ( | const FString & | Value | ) |
Sets a Console Variable to the specified value. Will keep a reference to the original value regardless of how many times the value has been set.
| Value | Value to set on the Console Variable |