Building Unreal Engine for macOS with XCode

Luke Brady
3 min readJun 30, 2020

--

Today I will walk you through the process of building Unreal Engine 4 from source for macOS with XCode. This tutorial will be beneficial if you are working on developing a game for macOS or if you need to build a cross platform game client for macOS.

What you will learn:

  • How to clone Unreal Engine source code from GitHub
  • How to setup and generate necessary files needed to build Unreal Engine
  • How to build Unreal Engine with XCode

What you will need:

Cloning Unreal Engine Source Code

After linking your Epic Games account with your GitHub account using the tutorial supplied here: https://www.unrealengine.com/en-US/ue4-on-github, you can clone Unreal Engine with the following command:

git clone https://github.com/EpicGames/UnrealEngine

Once the cloning process has completed, cd into the UnrealEngine directory. You will see a number of files that we need to run to get Unreal Engine ready to be compiled. First, we will run the Setup.sh command. You can also run Setup.command from Finder if you prefer the GUI.

Setup.sh will check to see if Unreal Engine’s dependencies have been installed and will handle downloading and installing any dependencies that are missing. Now that we have Unreal’s dependencies downloaded and installed, let’s generate the project files needed to open up the Unreal Engine project in XCode. To generate the project files, run GenerateProjectFiles.sh.

After the project file generation process has completed, we can now open up the Unreal Engine project in XCode.

Building Unreal Engine with XCode

To build Unreal Engine in XCode, we first need to open up the XCode application. After the application has started up, click File -> Open in the XCode toolbar.

Move into the directory where you cloned Unreal Engine and select the newly generated UE4.xcworkspace directory and then select Open. After the Unreal Engine project has opened in XCode, press the play button in the upper left hand corner to build the editor.

Depending on the specifications of your machine, the build may take a while. After the build has completed, the editor will start up and you can start building games for Mac with Unreal Engine.

Thanks for reading and have a great day!

--

--

Luke Brady

A blog fueled by code, coffee, and a healthy dose of video games. Follow me on Twitter: @LukeBrady105