Daily Unreal Column #14 - Override Console Variable
If you find yourself setting certain console variables every time you open your editor this solution is for you.
To override a console variable default value open DefaultEngine.ini
file. It can be found inside {ProjectRoot}/Config/DefaultEngine.ini
. Add a new header with anything you want as I have tested multiple different names and no matter what I added it has always worked. In my case, I'll use [ConsoleVariables]
header name. Then type name of any console variable you want to set and assign a value to it. In the below snippet you can see how I am setting two different console variables:
.
.
.
[ConsoleVariables]
MeleeTrace.ShouldDrawDebug=1
Slate.TooltipSummonDelay=100.0
.
.
.
Once these have been saved into the config file the editor must be restarted. To verify these have been set, you can type their names in the output log and you should either see the following:
LogConfig: CVar [[MeleeTrace.ShouldDrawDebug:1]] deferred - dummy variable created
or
LogConfig: Set CVar [[Slate.TooltipSummonDelay:100.0]]
Please note that this method also overrides the value in the packaged game, not just the editor.