This is my personal question…
I don’t know because the Unreal Engine Document is not properly set.
What is UDeveloperSettingsBackedByCVars?
Why use UDeveloperSettingsBackedByCVars?
When use UDeveloperSettingsBackedByCVars?
This is my personal question…
I don’t know because the Unreal Engine Document is not properly set.
What is UDeveloperSettingsBackedByCVars?
Why use UDeveloperSettingsBackedByCVars?
When use UDeveloperSettingsBackedByCVars?
did u figure this out ?
The basic gist of it is that UDeveloperSettingsBackedByCVars
is a special subclass that can hook settings to ConsoleVariables so that individuals/teams can keep settings saved in the same way you could with Developer Settings. An explanation of how to do this can be found here.
The basic structure is adding this meta UPROPERTY()
specifier:
meta=(ConsoleVariable="lyra.Weapon.DrawBulletTraceDuration")
And also making sure that your CVar is backed by an actual, separate static variable like:
static float DrawBulletTracesDuration = 0.0f;
static FAutoConsoleVariableRef CVarDrawBulletTraceDuraton(
TEXT("lyra.Weapon.DrawBulletTraceDuration"),
DrawBulletTracesDuration,
TEXT("Should we do debug drawing for bullet traces (if above zero, sets how long (in seconds))"),
ECVF_Default);
From my own experience, I could not use TAutoConsoleVariable
and get it to work, so FAutoConsoleVariableRef
seems to be the way to go.