UDocumentation UE5.7 10.02.2026 (Source)
API documentation for Unreal Engine 5.7
FAutoConsoleVariableDeprecated Class Reference

#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(""))
 

Detailed Description

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);

Constructor & Destructor Documentation

◆ FAutoConsoleVariableDeprecated()

FAutoConsoleVariableDeprecated::FAutoConsoleVariableDeprecated ( const TCHAR Name,
const TCHAR CVarToShadow,
const TCHAR DeprecatedAtVersion,
EShadowCVarBehavior  UsageBehavior = EShadowCVarBehavior::Ensure,
EShadowCVarBehavior  LookupFailureBehavior = EShadowCVarBehavior::Ensure,
const TCHAR DeprecationMessage = TEXT("") 
)
Parameters
NameThe name of this cvar
CVarToShadowThe name of the existing cvar that this one will shadow
DeprecatedAtVersionTHe first UE version when this was deprecated
UsageBehaviorHow to handle uses of the shadowed cvar by the deprecated name - defaults to ensure
LookupFailureBehaviorHow to handle failure of looking up the CVarToShadow name - defaults to ensure
DeprecationMessageOptional deprecation message - defaults to empty, auto-generated.

The documentation for this class was generated from the following files: