Welcome to the UE4 source code!
This is the source code page for the Unreal Engine on GitHub. With the UE4 source code, you can modify the engine and tools in any way imaginable and share your changes with others!
You can build the editor for Windows and Mac and compile games for Android, iOS, PlayStation 4, Xbox One and Linux. Source code for all tools is included as well, such as Unreal Lightmass and Unreal Frontend.
Before continuing, check out this short tutorial video about getting started with the engine code. We also have a programming guide and full API documentation.
We also have a forum section where you can discuss engine source and GitHub. Have fun!! We can't wait to see what you create!!
Source releases
This branch mirrors the live codebase that we're working on at Epic, and contains bleeding-edge changes by our engine team. The head revision may be unstable or not even compile, so we encourage working from a versioned release branch which is fully tested by our QA team instead. Official releases can be found here.
You can download the source in .zip format, but in order to contribute to the community you should setup a Git client on your computer. This page will have the info you need.
Remember, you'll need to download dependencies in order to actually build and run the engine. We periodically update the latest-preview tag with matching dependencies on our releases page.
Getting up and running
Here is the fun part! This is a quick start guide to getting up and running with the source. The steps below will take you through cloning your own private fork, then compiling and running the editor yourself on Windows or Mac. Oh, and you might want to watch our short tutorial video first. Okay, here we go!
-
Download the source and unzip it to a folder, or create a fork and clone the repository.
-
You should now have an UnrealEngine folder on your computer. All of the source and dependencies will go into this folder. The folder name might have a branch suffix (such as UnrealEngine-master), which is normal.
-
Download the required dependencies files for the latest preview tag: Required_1of2.zip, Required_2of2.zip.
-
Unzip the dependencies into the UnrealEngine folder alongside the source. Be careful to make sure the folders are merged together correctly. On Mac, we recommend Option + dragging the unzipped files into the UnrealEngine folder, then selecting Keep Newer if prompted.
-
Okay, platform stuff comes next. Depending on whether you are on Windows or Mac, follow one of the sections below:
Windows
-
Be sure to have Visual Studio 2013 installed. You can use any desktop version of Visual Studio 2013, including the free version: Visual Studio 2013 Express for Windows Desktop
-
Make sure you have June 2010 DirectX runtime installed. You don't need the SDK, just the runtime.
-
You'll need project files in order to compile. In the UnrealEngine folder, double-click on GenerateProjectFiles.bat. It should take less than a minute to complete. On Windows 8, a warning from SmartScreen may appear. Click "More info", then "Run anyway" to continue.
-
Load the project into Visual Studio by double-clicking on the UE4.sln file.
-
It's time to compile the editor! In Visual Studio, make sure your solution configuration is set to Development Editor, and your solution platform is set to Win64. Right click on the UE4 target and select Build. It will take between 15 and 40 minutes to finish compiling, depending on your system specs.
-
After compiling finishes, you can load the editor from Visual Studio by setting your startup project to UE4 and pressing F5 to debug.
-
One last thing. You'll want to setup your Windows shell so that you can interact with .uproject files. Find the file named UnrealVersionSelector-Win64-Shipping.exe in the UnrealEngine/Engine/Binaries/Win64/ folder and run it. Now, you'll be able to double-click .uproject files to load the project, or right click them to quickly update Visual Studio files.
Mac
-
Be sure to have Xcode 5.1 installed.
-
You'll need project files in order to compile. In the UnrealEngine folder, double-click on GenerateProjectFiles.command. It should take less than a minute to complete. You can close the Terminal window afterwards. If you downloaded the source in .zip format, you may see a warning about an unidentified developer. This is because because the .zip files on GitHub are not digitally signed. To work around this, right-click on GenerateProjectFiles.command, select Open, then click the Open button if you are sure you want to open it.
-
Load the project into Xcode by double-clicking on the UE4.xcodeproj file.
-
It's time to compile the editor! In Xcode, build the UE4Editor - Mac target for My Mac by selecting it in the target drop down in the top left, then using Product -> Build For -> Running. It will take between 15 and 40 minutes, depending on your system specs.
-
After compiling finishes, you can load the editor from Xcode using the Product -> Run menu command!
Additional target platforms
Android development currently works best from a PC. See the Android getting started guide.
iOS programming requires a Mac. Instructions are in the iOS getting started guide.
HTML5 is supported using Emscripten, and requires the optional dependencies to be unzipped into your UnrealEngine folder. Please see the HTML5 getting started guide.
Linux support requires the optional dependencies to be unzipped into your UnrealEngine folder, and the cross-compiler toolchain to be installed. See the Linux cross-compiling page on the wiki.
PlayStation 4 or Xbox One development require additional files that can only be provided after your registered developer status is confirmed by Sony or Microsoft. See the announcement blog post for more information.
More info
Visual Studio 2013 and Xcode 5.1 are strongly recommended for development.
Legacy support for Visual Studio 2012 can be enabled by unzipping the optional dependencies into your UnrealEngine folder and changing WindowsPlatform.Compiler to VisualStudio2012 in Engine\Source\Programs\UnrealBuildTool\Windows\UEBuildWindows.cs.
The first time you start the editor from a fresh source build, you may experience long load times. This only happens on the first run as the engine optimizes content for the platform and fills the derived data cache.
Your private forks of the Unreal Engine code are associated with your GitHub account permissions. Just remember that if you unsubscribe or switch GitHub user names, you'll need to re-fork and upload your changes from a local copy.