Building UE4 from the Oculus GitHub Repository
The following section describes how to download, compile, and launch UE4 from the Oculus GitHub repository using Visual Studio 2015 or 2017.
Professional developers who wish to take full advantage of the features available with our Unreal integration should download and build the source code. For more information and an overview of other options for working with Unreal, see Unreal Game Engine.
This guide assumes you have installed Visual Studio 2015 or 2017 and are familiar with its use.
Note: Visual Studio 2013 is no longer supported.
Several of these steps may take some time to complete. Some of the steps typically take over an hour, depending on your computer and the speed of your Internet connection.
- Clone or download the UE4 source code from the Oculus GitHub repository here: https://github.com/Oculus-VR/UnrealEngine. To access this repository, you must have access to the private Epic GitHub repository (see https://www.unrealengine.com/ue4-on-github for details).
- If you downloaded a zip archive of the code, extract the archive contents to a directory where you would like to build the engine, e.g., C:\Unreal\4.xx-oculus. We recommend installing to a short path, or you may have errors in the next step with files that exceed the Windows length limit for file names. Alternately, you can map your install directory as a Windows drive to reduce the path length.
- Run Setup.bat. You may need to Run as Administrator.
- Run GenerateProjectFiles.bat. You may need to Run as Administrator.
- Launch UE4.sln to open the project solution in Visual Studio.
- In the menu bar, select Build > Configuration Manager. Verify that Active solution configuration is set to Development Editor, and that Active solution platform is set to Win64.
- In the Solution Explorer, right-click UE4 under Engine and select Set as Startup Project.
- Select Build from the same context menu as the previous step.
- To launch the engine:
- With command-line arguments: Right-click UE4 in the Solution Explorer and select Properties. In the UE Property Pages dialog, select Configuration Properties > Debugging on the left. Enter any desired configuration options in the Command Arguments field on the top.
- Without command-line arguments: In the Solution Explorer on the right, right-click UE4 under Engine and, in the context menu, select Debug > Start New Instance to launch the engine.
- Select the project you would like to open, or specify a new project. If you are creating a new project, don’t forget to specify a project name.
- At this point, the engine will close and a new instance of Visual Studio will launch with your selected or new project. Repeat step 6 to launch the engine with the specified project.
For Epic's instructions on building the Unreal Engine from source, see Building Unreal Engine from Source guide.