Build Instructions¶
In this section we describe the process of packaging a MAGES enabled project. To produce a packaged application, you will need to:
Select the startup level
Switch to the appropriate engine settings for your platform of choice
If you are building for VR, in the Project/Description
section, make sure that “Start in VR” is enabled
Maps & Modes Settings¶
In the Maps & Modes
section, choose the application startup map through Game Default Map
.
Packaging - Windows¶
From the menu select “File”, choose “Package Project” and click on “Windows (64-bit)”.
Packaging - Oculus Mobile¶
Note
Before building, make sure you’ve set up the application startup map
To get started, follow the Android setup from Unreal’s documentation.
MAGES Unreal can setup some good default settings for exporting for Android (Oculus), and it is highly recommended to use them. On the menu bar, click on “MAGES”, select “Apply Project Settings”, and then click on “Android”:
Afterwards, open the Project Settings, and inside the “Android” section under Platforms, press the Configure Now button, to enable packaging for android in the project
In the same section, scroll down to find the “Build” sub-section, and make sure that you are building for arm64:
Last, scroll further down to find the “Advanced APK Packaging”, clear the “Package for Oculus Mobile Devices” property, and add “Oculus Quest”, and “Oculus Quest 2”
Package the Project¶
To package for Oculus Quest 1&2, click on File > Package Project > Android > Platform of your choice
. Android (ASTC) is recommended by Oculus for building for their mobile devices.
After the build has finished, go to your packaged project’s folder, and run the “Install_[Your Project Name]-arm64.bat” batch file.
Common Issues¶
System cannot find ADB
When executing the “Install_[Your Project Name]-[arch].bat” file, the system may not be able to find “adb.exe”. Make sure it is included in your PATH in the user’s “Environment Variables”:
Unreal Engine 4 Android build error
When pacakging, Unreal may complain that it cannot use the version of the Android NDK or SDK that you have installed. Make sure that your “Android SDK” settings (inside the Project Settings) are not empty values; Unreal has trouble finding your SDK installation otherwise:
Project starts in a non-VR windowed mode
Make sure that “Start in VR” under Project Settings > Description. Even if it is, set it and unset it, to ensure that Unreal has saved the value.
Additionally, if you’re building for Android, redo this step