Compiling Your UE5 Game For Apple Silicon (M1)

This tutorial will walk you through how to compile and run your UE5 game on native Apple Silicon (M1 chip)

Updated almost 2 years ago Edit Page Revisions

Compiling Your UE5 Game For Apple Silicon (M1)

Please make sure you meet the following requirements

  • M1 Based Mac (Apple Silicon)
  • Unreal Engine 5 (Full Source)
  • Visual Studio Code

Generating A Visual Studio Code Project For UE

  • Run UnrealBuilTool located here UnrealEngine/Engine/Binaries/DotNET/UnrealBuildTool to generate Visual Studio Code project files for the Engine
./{UEInstallDir}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool -VSCode
  • To generate Visual Studio Code project files for your game run
./{UEInstallDir}/Engine/Binaries/DotNET/UnrealBuildTool/UnrealBuildTool -VSCode {AbsolutePath}/{ToYourGame}/{YourGameName}.uproject -game

It's important to specify -game when generating for your game

Modifying Your Generated Project Files To Compile For Apple Silicon

  • Open the generated UE5 Visual Studio Code project located at {UEInstallDir}/UE5.code-workspace
  • Open tasks.json and locate the "label": "UnrealGame Mac Development Build" section and modify it by adding "-architecture=arm64" like so
{
			"label": "UnrealGame Mac Development Build",
			"group": "build",
			"command": "Engine/Build/BatchFiles/Mac/Build.sh",
			"args": [
				"UnrealGame",
				"Mac",
				"Development",
				"-waitmutex",
				"-architecture=arm64" <----Add This Line
			],
			"problemMatcher": "$msCompile",
			"dependsOn": [
				"UnrealBuildTool Mac Development Build"
			],
			"type": "shell",
			"options": {
				"cwd": "{UEInstallDir}"
			}
		},
  • You can do this for any of the UnrealGame sections such as for DebugGame, Shipping etc
  • Now do the exact same thing for your Game project
  • Open the generated UE5 Visual Studio Code project located at {YourGamePath}/{YourGameName}.code-workspace
  • Open tasks.json and locate the "label": "{YourGameName} Mac Development Build" section and modify it by adding "-architecture=arm64" like so
{
	"label": "{YourGameName} Mac Development Build",
	"group": "build",
	"command": "Engine/Build/BatchFiles/Mac/Build.sh",
	"args": [
		"{YourGameName}",
		"Mac",
		"Development",
		"{PathTo}/{YourGame}/{YourGameName}.uproject",
		"-waitmutex",
		"-architecture=arm64" <----Add This Line
	],
	"problemMatcher": "$msCompile",
	"type": "shell",
	"options": {
		"cwd": "{UEInstallDir}"
	}
},
  • You can do this for any of the {YourGameName} sections such as for DebugGame, Shipping etc {{danger}}

Make sure to not modify the {YourGameName}Editor sections as the Editor does not support Apple Silicon (M1)

{{/danger}}

Compiling Your Game For Apple Silicon (M1)

  • Press CMD+Shift+B to bring up the build menu
  • In your UE5 project search for UnrealGame Mac Development Build and run it
  • In your Game project search for {YourGameName} Mac Development Build and run it.

Packaging Your Game

  • The last step is to cook and package your game
  • This can be done by using UnrealAutomationTool located here {UEInstallDir}/Engine/Build/BatchFiles/RunUAT.sh
  • Simply run these commands

1. cd {UEInstallDir}
2. Engine/Build/BatchFiles/RunUAT.sh BuildCookRun -project={AbsolutePath}/{ToYourGame}/{YourGameName}.uproject -cook -stage -package -noP4 -clientconfig=Development -serverconfig=Development -specifiedarchitecture=arm64 -architecture=arm64

  • Your packaged game can now be found and run here {AbsolutePath}/{ToYourGame}/Saved/StagedBuilds/Mac/{YourGameName}.app

Complete!