Downloading Unreal Engine Source Code

Steps for connecting to the source code repository and downloading the latest build of Unreal Engine.

Choose your operating system:

Windows

macOS

Linux

This page provides detailed instructions for subscribers to download the source code for Unreal Engine from the Unreal Engine GitHub repository, and to get started working with the code.

Before you can access the repository at https://github.com/EpicGames/UnrealEngine, you must:

  • be an Unreal Engine subscriber.

  • have a GitHub account.

  • have associated your GitHub account with your Unreal Engine account as described on the UE5 on GitHub page.

You don't have to download the source code to work with Unreal Engine. If you'd rather simply download and install the binary version of Unreal, read our Installing Unreal Engine documentation to learn how to Get Unreal. However, you may find that having access to the source code can be extremely valuable for you and your project. For example:

  • You'll get access to all the latest features and bug fixes that Epic engineers make every day, practically up to the minute.

  • If you find a bug that we haven't fixed yet, but that is crucial to your project, you can unblock your project by making the fix in your own version of the source code and rebuilding your own binaries.

  • You can improve the engine and help the whole Unreal community by submitting your fixes and features back to Epic.

If you are an Unreal Engine licensee, you can access the source code through our Perforce server instead of the public GitHub repository.

Source Code Branches

You'll notice that we've published UE5's source code in several branches.

Branches whose names contain dev, staging, and test are typically for internal Epic processes, and are rarely useful for end-users Other short-lived branches may appear from time to time as we stabilize new releases or hotfixes.

Release Branch

The Release branch always reflects the current official release. These are extensively tested by our QA team, so they make a great starting point for learning Unreal Engine and for making your own projects. We work hard to make releases stable and reliable, and aim to publish a new release every few months.

Main Branch

Most active development on UE5 happens in the ue5-main branch. This branch reflects the latest release of the engine and may be buggy or it may not compile. We make it available for developers who are eager to test new features or work in lock-step development with us.

If you choose to work in this branch, be aware that it is likely to be ahead of the branches for the current official release and the next upcoming release. Therefore, content and code that you create to work with the ue5-main branch may not be compatible with public releases until we create a new branch directly from ue5-main for a future official release.

Downloading the Source Code

Please follow these instructions to download the Unreal Engine source code.

Please make sure you are running Visual Studio 2019 or higher for Windows Desktop installed before proceeding.

  1. Install GitHub for Windows then fork and clone our repository.

    To use Git from the command line, see the Setting up Git and Fork a Repo articles.

    If you'd prefer not to use Git, you can get the source with the 'Download ZIP' button on the right. The built-in Windows zip utility will mark the contents of zip files downloaded from the Internet as unsafe to execute, so right-click the zip file and select 'Properties...' and 'Unblock' before decompressing it. Third-party zip utilities don't normally do this.

  2. Install Visual Studio 2019.

    All desktop editions of Visual Studio 2019 can build UE5, including Visual Studio Community 2019, which is free for small teams and individual developers. Be sure to include C++ support as part of the install, which is disabled by default.

  3. Open your source folder in Explorer and run Setup.bat.

    This will download binary content for the engine, as well as installing prerequisites and setting up Unreal file associations. On Windows, a warning from SmartScreen may appear. Click More info, then Run anyway to continue.

    A clean download of the engine binaries may take some time to complete. Subsequent checkouts only require incremental downloads and will be much quicker.

  4. Run GenerateProjectFiles.bat to create project files for the engine. It should take less than a minute to complete.

  5. Load the project into Visual Studio by double-clicking on the UE5.sln file. Set your solution configuration to Development Editor and your solution platform to Win64, then right click on the UE target and select Build. It may take anywhere between 10 and 40 minutes to finish compiling, depending on your system specs.

  6. After compiling finishes, you can load the editor from Visual Studio by setting your startup project to UE5 and pressing F5 to debug.

  1. Install a Git client like GitHub for Mac, then fork and clone our repository.

    To use Git from the Terminal, see the Setting up Git and Fork a Repo articles. If you'd rather not use Git, use the 'Download ZIP' button on the right to get the source directly.

  2. Install the latest version of Xcode.

  3. Open your source folder in Finder and double-click on Setup.command to download binary content for the engine. You can close the Terminal window afterwards.

    If you downloaded the source as a .zip file, you may see a warning about it being from an unidentified developer (because .zip files on GitHub aren't digitally signed). To work around it, right-click on Setup.command, select Open, then click the Open button.

  4. In the same folder, double-click GenerateProjectFiles.command. It should take less than a minute to complete.

  5. Load the project into Xcode by double-clicking on the UE5.xcworkspace file. Select the ShaderCompileWorker for My Mac target in the title bar, then select the 'Product > Build' menu item. When Xcode finishes building, do the same for the UE5 for My Mac target. Compiling may take anywhere between 15 and 40 minutes, depending on your system specs.

  6. After compiling finishes, select the 'Product > Run' menu item to load the editor.

Our developers and support teams currently use the latest version of Ubuntu; as a result, we may not be able to provide support for other Linux distributions (including other versions of Ubuntu).

  1. Install a visual Git client and fork our repository. If you'd prefer not to use Git, use the Download ZIP button on the right to get the source as a zip file.

  2. Open your source folder and run Setup.sh to download binary content for the engine.

  3. Both cross-compiling and native builds are supported.

Cross-compiling is handy when you are a Windows (Mac support planned too) developer who wants to package your game for Linux with minimal hassle, and it requires a cross-compiler toolchain to be installed (refer to the Linux cross-compiling page).

Native compilation is discussed in a separate README.

This page shows Licensees how to download and build Unreal Engine from our source code repository on GitHub. If you'd like to download the binary version of Unreal Engine, read our Installing Unreal Engine documentation to learn how to Get Unreal.

Additional target platforms

  • Android support will be downloaded by the setup script if you have the Android NDK installed. See the Android Quick Start guide.

  • iOS development requires a Mac. Instructions are in the iOS Quick Start guide.

  • Development for consoles and other platforms with restricted access, like Sony PlayStation, Microsoft Xbox, and Nintendo Switch, is only possible if you have a registered developer account with those third-party vendors.

Depending on the platform, additional documentation or guidance may be available in the Unreal Developer Network support site, or as a downloadable archive in the section of the Unreal Engine Forums that is dedicated to your platform.

If you don't have access to these resources, first register a developer account with the third party vendor. Then contact your Epic Games account manager if you have one, or fill out and submit the Console Development Request form for Unreal Engine if you don't. Epic will contact you with a formal agreement to digitally sign. Once this is approved, you will receive instructions on how to access source code, binaries, and additional instructions for your platform.

Licensing and Contribution

Your access to and use of Unreal Engine on GitHub is governed by the Unreal Engine End User License Agreement. If you don't agree to those terms, as amended from time to time, you are not permitted to access or use Unreal Engine.

We welcome any contributions to Unreal Engine development through pull requests on GitHub. Most of our active development is in the master branch, so we prefer to take pull requests there (particularly for new features). We try to make sure that all new code adheres to the Epic coding standards. All contributions are governed by the terms of the EULA.

Next Steps

Now that you've downloaded and set-up Unreal Engine, you're ready to build the engine from source.

Footnotes

The first time you start the editor from a fresh source build, you may experience long load times. The engine is optimizing content for your platform to the derived data cache, and it should only happen once.

Your private forks of the Unreal Engine code are associated with your GitHub account permissions. If you unsubscribe or switch GitHub user names, you'll need to re-fork and upload your changes from a local copy.