Tutorials – UE4 Quick first tips
Quick First Tips
Reducing Editor CPU usage
Turn of real time in a viewport(s) when you do not need it (which should be 90% of the time). Ctrl+R, or in the dropdown menu on the top left of the viewport.
Turn off real time content browser thumb nails. Found in the View Options in the bottom right of the content browser.
Various windows run in real time as well, such as the Blueprint component editor and material windows. Turning real time off there also may help some.
I have not tested this in-depth but it appears that resolution has a major impact on performance. In other words using two monitors means a far greater number of pixels and seems to run considerably slower. Also keeping a window open that is heavy to render, such as a Blueprint window with tons of wires, will slow down the editor.
And beyond all of the above, you can also clamp the viewport framerate entirely. Enter “t.MaxFPS 20″ in the command box top right of the editor to lock it to 20 FPS maximum. This is particlaly good when you are on a laptop and you don’t want it to drain the battery as fast/overhear/sound like a jet engine.
In the editor preferences there is a setting “Use Less CPU when in background”. This is currently not default enabled, but there is no reason not to enable it.
Running the game
To run the game, not the editor, right click the project file – Launch game.
Alternatively you can create a shortcut or a BAT file, which executes following “install location\4.6\Engine\Binaries\Win64\UE4Editor.exe” “path to project + name.uproject” -game -ResX=1920 -ResY=1080 -log – obviously change “install location” and “path to project + name” to reflect your computer/setup. And the 4.6 reference in the folder if you use a different build.
Log files and generated config files
These are now located in your contentfolder\Saved. The Saved folder thus can be deleted at any time, and should not be submitted to source control or sent to other developers. This folder also contains content and level backups. You may want to clear it out every now and then.
Auto Load Project
You can make the editor automatically load a predefined project when it starts by ticking a box in the project selection window. Not that unknown, but lesser well known is that this information is saved in a txt file. If ever you want to force the editor to show the project selection window again, for example because your project crashes on load, you can delete or modify following file: C:\Users\YOURNAME\AppData\Local\UnrealEngine\4.6\Saved\AutoLoadProject.txt
The engine caches shaders to C:\ no matter where you install. This folder can quickly become 10 GB or more on big projects. To make it write to your project folder instead add following lines to your default engine ini. Shader cache should not be submitted to source control.
Boot=(Type=Boot, Filename=”%GAMEDIR%DerivedDataCache/Boot.ddc”, MaxCacheSize=512)
Local=(Type=FileSystem, ReadOnly=false, Clean=false, Flush=false, PurgeTransient=true, DeleteUnused=true, UnusedFileAge=34, FoldersToClean=-1, Path=”%GAMEDIR%DerivedDataCache”)
You can freely move project folders around, so you can easily move it to another hard drive or computer. Simply copy the entire folder to another location and open the uproject file found in it.
Moving content between projects
There is a migrate option found in the content browser, but you can also simply copy paste the files in Windows file explorer from one project folder to the next. to move content between projects. Simply browse to your project location, and paste in the uasset files to similar locations in another project. It is crucial the location is identical or it will not work well. So an asset in MyProject\Content\MyGame\SuperAwesomeShaders\Textures has to be migrated to MySecondProject\Content\MyGame\SuperAwesomeShaders\Textures for it to work.
Duplicating and modifying projects
If you want to duplicate a project, you can duplicate the entire project folder, and then rename (in Windows) the dll file to match the name of the new project folder (if you got code) + rename the uproject file to match the folder name + open the uproject file in notepad and change the name in there as well (only if you got code) + in DefaultEngine.ini rename the GameName under URL. You have now duplicated and renamed an entire project.
Project associations with certain engine builds
Projects associate themselves with a specific engine build. Upon opening the project in another (newer) build you will get a dialogue box asking you to convert the project. You can manually force the project to convert, which is good if for example you have a team working on the game and you don’t want everyone to get that question.
In the project file, YOURGAME.uproject, found in the root of the project folder, you will see “EngineAssociation”: “4.6″, if you open it up in Notepad. Change the build association there and you are set. Note that DLL files will of course still have to be recompiled regardless, if you have code in your project.