UKismetSystemLibrary::GetConsoleVariableIntValue
#include "Kismet/KismetSystemLibrary.h"
Access: public
Specifiers: staticUFUNCTIONBlueprintCallable
Description
Retrieves the current value of an integer console variable by name. Returns 0 if the variable does not exist.
Caveats & Gotchas
- • A missing cvar and one set to 0 are indistinguishable from the returned value alone.
- • Passing a float or bool cvar's name returns 0 instead of converting the underlying value, since lookups are type-specific.
Signature
static int32 GetConsoleVariableIntValue(const FString& VariableName); Parameters
| Name | Type | Description | Default |
|---|---|---|---|
| VariableName | const FString& | Name of the console variable to look up. | — |
Return Type
int32 Example
Read an int cvar C++
int32 ShadowQuality = UKismetSystemLibrary::GetConsoleVariableIntValue(TEXT("sg.ShadowQuality")); See Also
Tags
Version History
Introduced in: 4.0
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?