UKismetSystemLibrary::GetConsoleVariableBoolValue
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Evaluates whether the named integer console variable currently holds a non-zero value. Returns false if the variable does not exist.
Caveats & Gotchas
- • Despite the name, this reads an integer cvar and treats any non-zero value as true — it does not read a dedicated boolean cvar type.
- • A missing cvar and one explicitly set to 0 both return false, so absence and 'off' cannot be distinguished.
Signature
static bool GetConsoleVariableBoolValue(const FString& VariableName); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| VariableName | const FString& | Name of the console variable to look up. | — |
Return Type
bool Example
Check a toggle cvar C++
bool bVSyncEnabled = UKismetSystemLibrary::GetConsoleVariableBoolValue(TEXT("r.VSync")); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?