- This guide assumes you want to build the Unreal Engine 5 (UE5) editor from source in order to get a Windows Unreal Engine 5 Editor to share with a team or studio
- This was writen with the absolute minimum build requirements for our team to avoid taking more disk space and compile time than needed - please modify to fit your needs.
- Keep in mind that, as of writing, I have little experience with the Unreal build tools, I'm simply documenting what worked for me.
- Also see this excellent blog post especially if you are building Unreal Engine 4 (UE4): https://www.edwardbeazer.com/unreal-installed-builds-rocket-buids/
- If you do not have it already, download git bash. https://gitforwindows.org/
- Get access to the unreal source repo by following this guide: https://www.unrealengine.com/en-US/ue4-on-github
- Install Visual Studio 2019 on the C:\ drive for UE5 (Visual Studio 2017 for ue4)
- Make sure to install the desktop c++ components, windows sdk (current version should be selected by default), game development in c++ and Unreal installer in the right side menu of the Visual Studio installer: https://docs.unrealengine.com/4.27/en-US/ProductionPipelines/DevelopmentSetup/VisualStudioSetup/
- Next, install Debugging Tools for Windows as part of your Windows SDK by going to the "add or remove programs" pannel of the windows settings app, find your windows sdk version in the apps list, click Modify and check debugging tools for windows, then click install.
- Find a branch and commit hash of a specific commit in the ue5 source git hub repo (at https://github.com/EpicGames/UnrealEngine.git) that you would like to build from.
- We used the commit with hash 8ec0dc4e3eed7a38cb783bbb48cd2ad5c441beeb on the 5.0 branch, because it is more stable than the ue5-main branch and that commit seemed to work well.
- Make a folder in a harddrive w at least 200gb available
- open folder in git bash & run these commands, making sure to replace the commit hash (8ec0dc4e3eed7...) with the full commit hash from the unreal engine source that you desire to build from:
git init
git remote add origin https://github.com/EpicGames/UnrealEngine.git
git fetch --depth 1 origin 8ec0dc4e3eed7a38cb783bbb48cd2ad5c441beeb
git checkout FETCH_HEAD
- In Git Bash in the same folder (should now have setup.bat in it and other stuff) run:
NOTE: remove any of the following setup.bat command arguments if they are for target platforms that you would like to compile your game for (otherwise unreal won't download the neccesary dependencies to support that game compile target)
./Setup.bat -exclude=WinRT -exclude=Mac -exclude=MacOS -exclude=MacOSX -exclude=osx -exclude=osx64 -exclude=osx32 -exclude=Android -exclude=TVOS -exclude=Linux -exclude=Linux32 -exclude=Linux64 -exclude=linux_x64 -exclude=HTML5 -exclude=PS4 -exclude=XboxOne -exclude=Switch -exclude=Dingo -exclude=Win32 -exclude=GoogleVR -exclude=LeapMotion
./GenerateProjectFiles.bat
- Then open command prompt or powershell and go to the same Unreal Engine Source folder as you just had open in git bash, then run:
NOTE: all other command arguments can be figured out from Engine\Build\InstalledEngineBuild.xml -especially the "withSOMEPlatformName" => statements for target platforms to include, as by default this build command will only compile win64 games, includes client and server multiplayer components, but does not include engine debuging or Datasmith Plugins. also see: https://www.edwardbeazer.com/unreal-installed-builds-rocket-buids/
.\Engine\Build\BatchFiles\RunUAT.bat BuildGraph -target="Make Installed Build Win64" -script="Engine\Build\InstalledEngineBuild.xml" -clean -set:WithWin64=true -set:HostPlatformEditorOnly=true -set:WithClient=true -set:WithServer=true -set:GameConfigurations="Development;Shipping" -set:SignExecutables=false -set:EmbedSrcSrvInfo=false -set:CompileDatasmithPlugins=false -set:WithDDC=false
When done (which took 7+ hours for me) the "installed" aka "standalone" build is in the /LocalBuilds/Win64/ folder. Zip that folder and send it to anyone who needs the built editor. To run the editor, go into that folder and run the /binaries/win64/UnrealEditor.exe file.
Thanks this works great - the exported build is rather huge still, I know that in Visual Studio you can clean the project via a Clean Build command and also manually some cleanup by deleting .pdb files.
Is there any way to clean up the build after running the
.\Engine\Build\BatchFiles\RunUAT.bat BuildGraph
command via a command