Hello, everyone.
Welcome to today's tips and tricks.
Today, we will be covering how you can
use configuration files to save specific settings in your Unreal
Engine projects.
Configuration files can be used to set values
for properties that will be initialized
when the project is loaded.
This can improve your workflow by having your Unreal Engine projects
launch with your preferred specified settings.
Similar to how a project knows to load with past plug-ins
you may have installed, we can set the state of the project
with the project settings and console settings you prefer.
With this setup, you'll be able to share settings
as text with colleagues or transfer settings
to different versions of the engine.
Today, I'll be using Unreal Engine 4.27.
However, the same principles can be applied
to other versions of the engine and be used among many industries.
Let's take a look at how this works.
We will first cover project setting options
and then cover how to save the settings.
To do this, let's set it up for the project I have open here.
Now, say there are certain settings that I like to use for each project.
We could do these manually by making the changes in Project Settings
as well as in the output log.
If we open up Edit, Project Settings, we
have the ability to use this UI to save settings for a project.
But there may be settings that do not live in this UI
that we want to initiate when a project starts.
So perhaps I want to customize the way I interact with the editor.
For instance, you'll see that when I hover
over the objects on the left-hand side,
tooltips pop up that block the viewport.
So perhaps I want to remove those.
Or another example is you'll see I have
this path trace viewport active.
When I move my camera, it starts to render out.
But it would be nice to be able to visualize
the progress of the render.
I can manually control these by going up to Window, Developer
Tools, Output Log.
And you'll notice that a window pops up at the bottom of the screen.
Here at the very bottom, it says "Enter Console Command."
A console command is a string that is sent to the engine
that the engine recognizes and can react to in some way.
So I'm going to type in some commands that
are going to control the editor.
So I've looked up how to do this for tooltips.
The command is "Slate.EnableTooltips."
And you'll see that it starts to auto-populate as I type.
You can hit Tab to finish that auto-completion.
And then, I'll hit Space and 0, and then hit Enter.
So you'll see that it is a Boolean action and reads "false" here.
So when I go up to the top, those tooltips are no longer there.
You can also use the command "Slate.TooltipSummonDelay."
This means that it would still come up,
but if needed after a 10-second delay or any amount of time
you'd like to set.
Now I can do the same thing for the path tracing progress.
So I'll type in "R.PathTracing.ProgressDisplay, 1."
1 will turn on the display bar.
So now when I go to my viewport, you'll
notice that a progress display bar pops up.
Now, these are simple project settings and console
variables that can be utilized.
But let's take a look at how you can explore new console variables
and learn how they work.
To do this, I'll go back to my Output Log window
at the bottom of the screen.
Now, you may have noticed when I typed in "PathTracing,"
many options popped up.
So you can do the same thing for ray tracing.
And you'll see that there are many different options for this one.
Now, these are just controlling the render settings.
But you can also understand how you could control optimization
settings this way as well.
So perhaps you are working in a much bigger file,
and you want to start off the project efficiently.
So perhaps you want to play with the quality.
So maybe you lower the quality for when the project starts
so you can easily manipulate the file,
and then bump up the quality when it is time to render.
So you'll see that when you type in "quality" here,
we have a lot of different options.
I'll select "r.ShadowQuality."
But I want to learn what this does.
I can type in "?"
afterwards and hit Enter.
And you'll see it gives me some information as well
as the current applied setting.
So this console command defines the shadow method,
which allows to adjust for quality or performance.
It's currently set at 5.
But I can play around with this number
to set up the file so it works efficiently when I open it.
You can use the up arrow on your keyboard
to bring back that command you just typed in,
which is going to give you easy access for testing numbers.
We can, at any time, check the current setting
by also simply typing in the console command and hitting Enter.
If you are testing and want to revert to the default number,
you can type in "-1."
Now the numbers you type in will stay while you have the project open,
but it will reset to default when the project restarts.
However, there is a way we can save these settings in the configuration
files.
So let's take a look at how to do this.
I'll go ahead and close my file, open up my Epic Games launcher.
I'll go to the Library tab, and I'm going to hover over
the project I was working with.
I'll right-click, select Show In Folder.
And when a new project is created, a few text files
are also created, including DefaultEngine.ini.
So that can be found here in the Config folder.
We will be working with this DefaultEngine.
I'll double-click it, and it will open up my text editor.
Now, there's no specific editor needed to open up the file,
as it is a simple text.
And depending on what project template you start with,
the existing core text may differ from project to project.
Now you can place the information we are
about to add anywhere in the file.
The order does not matter, but I'm going
to go down to the bottom of the text file and place my settings here.
I'll type in, bracket, SystemSettings, end bracket.
I'll then hit Enter.
Now, the name here is not important.
It could be named MySystemSettings or CustomCVars or whatever
you'd like it to be.
It simply helps you annotate and organize the file.
Now you can type in any console variable
that you would in the output log in Unreal Engine.
So I'll go ahead and add in the examples
I did earlier in this presentation.
For hiding tooltips, I'll type in "Slate.EnableTooltips."
Now, the syntax will be important when typing in the information.
So here, instead of Space, I'll type in "=0."
0 turns off the tooltip in this setting.
1 turns it on.
Be sure to research your console variable
to understand if it has a Boolean action like this one
or a defining number similar to that shadow quality.
I'll go ahead and hit Enter.
And now I'll do the same thing for the progress bar--
"r.PathTracing.ProgressDisplay=1."
Now I'll save and close out of this file and minimize it.
Let's open the project back up to see these settings initialize.
So you'll see that the progress bar was immediately present.
And when I hover over objects, you'll notice there are no longer tooltips.
Now let's go back to the INI files I was working with
to see what we can do with these settings now.
These settings were placed in the project
folder, which means they are local and specific to this project.
If you'd like to save these settings for all projects,
you can save them in the engine's configuration file of the Unreal
version you are working in.
To take a look at that, I'm going to pull up my Unreal Engine version.
And you'll see it's under Engine, Config.
And it will be in the BaseEngine file.
The settings you add here will be the new default settings for project
using that Engine version.
If you curated settings in your local project configuration files,
those will override any settings you have in the BaseEngine file.
While working in that BaseEngine file,
be sure not to change any of the original core text,
as it is important information for the engine to run.
So now that where your default settings live,
you can go back to the settings in your local project, copy the text,
and paste this text into other projects or other Unreal versions.
We hope this helps you personalize your experience working Unreal
and speed up workflows as needed.
Thank you for watching today's tips and tricks.
We will see you next time.