![]() |
UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
|
#include <IConsoleManager.h>
Public Member Functions | |
| CORE_API | FAutoConsoleVariableDeprecated (const TCHAR *Name, const TCHAR *CVarToShadow, const TCHAR *DeprecatedAtVersion, EShadowCVarBehavior UsageBehavior=EShadowCVarBehavior::Ensure, EShadowCVarBehavior LookupFailureBehavior=EShadowCVarBehavior::Ensure, const TCHAR *DeprecationMessage=TEXT("")) |
A class that can be used to deprecate a CVar - rename your existing CVar to the new name, then create a shadow of it with the old name with something like this:
FAutoConsoleVariableDeprecated ShadowCVar(TEXT("r.oldname"), TEXT("r.newname"), TEXT("5.5")); FAutoConsoleVariableDeprecated ShadowCVar(TEXT("r.oldname"), TEXT("r.newname"), TEXT("5.5"), EShadowCVarBehavior::Assert);
| FAutoConsoleVariableDeprecated::FAutoConsoleVariableDeprecated | ( | const TCHAR * | Name, |
| const TCHAR * | CVarToShadow, | ||
| const TCHAR * | DeprecatedAtVersion, | ||
| EShadowCVarBehavior | UsageBehavior = EShadowCVarBehavior::Ensure, |
||
| EShadowCVarBehavior | LookupFailureBehavior = EShadowCVarBehavior::Ensure, |
||
| const TCHAR * | DeprecationMessage = TEXT("") |
||
| ) |
| Name | The name of this cvar |
| CVarToShadow | The name of the existing cvar that this one will shadow |
| DeprecatedAtVersion | THe first UE version when this was deprecated |
| UsageBehavior | How to handle uses of the shadowed cvar by the deprecated name - defaults to ensure |
| LookupFailureBehavior | How to handle failure of looking up the CVarToShadow name - defaults to ensure |
| DeprecationMessage | Optional deprecation message - defaults to empty, auto-generated. |