RealDocs

UKismetSystemLibrary::GetConsoleVariableBoolValue

function Engine Blueprint Since 4.0
#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"));

Version History

Introduced in: 4.0

Version Status Notes
5.6 stable

Feedback

Was this helpful?

Suggest an edit

Select a field above to begin editing.