How to build the Unreal Editor
I routinely compile the Unreal Editor from source code into distributable binaries - this effectively builds the same Unreal Editor you would get if you downloaded it from the Epic game launcher. This is how to set the build from scratch, and most importantl, run it at the command line. This may not be the only way to build the engine, but it's how I build it - it works, and that's good enough for me.
Source code
The easiest way to get the source code is from Epic's Github page, you will have to go through a quick automated process to get access to it.
Hardware and operating System
I use Windows 10 64 bit, the more cores and RAM you have the better, but anything vaguely modern will do.
Software
This is the interesting bit.
1 . From our experience Unreal Engine cannot build properly on Visual Studio 2019, so install Visual Studio 2017 with the 2017 installer. The free Community Edition will do just fine. VS will offer different development profiles, select C++ for game dev w/ profiling tools and latest sdks (these two are preselected).
Then use the Visual Studio 2019 installer to update Visual 2017 to version 15.6 or higher. While doing this, under "C++ for game dev" include Windows SDK 10.0.17763.0 and remove all other SDK versions. They seem to break things.
In the installer, under "individual components"
- add "NuGet targets and build tasks".
- add ".Net framework 4.5 target pack". You must select "4.5" exactly, not a semantically compatible version such as "4.5.2", as Unreal seems to have a hardcoded build dependency on exactly 4.5.
- add .Net framework 4.6.2 targeting pack
- add "C# and VB Rosyln compilers"
Search for, download and install the DirectX 2010 SDK. Install whatever .Net frameworks it wants, and ignore any install errors, as long as it manages to get someothing on your system you're good.
Download and install the latest Windows 10 SDK ISO, of all the options it has only "Degugging tools for Windows" is needed. Do NOT install this SDK with the Visual Studio installer, it will not work. This process should install an executable called
pdbcopy.exe
on your system, by default in the locationC:\Program Files (x86)\Windows Kits\10\Debuggers\x64
. This folder must be in your system's PATH. To confirm, open a command window and runpdbcopy
, the app should responde with some help instructions.Find and install Microsoft Visual C++ redistributables 2013, 2015 and 2019, once again using your search engine of choice.
Building
Assuming you've cloned the engine code from Github. At the command line, set your current directory to
[Your checkout folder]\Engine\Build\BatchFiles
Then run
RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -clean -set:HostPlatformOnly=true
Your engine build will appear in
/LocalBuilds/Engine/Windows/Engine
This build is fully portable, so it doesn't require installation.
Conclusion
That is all there is to it - it's not particularly complex to get working, but as is usually the case, the official documention doesn't always cover the details in a simple way, and I fumbled around in the dark for several days figuring out all the required bits.