Build Configuration Overview
This page provides an overview of configuring and generating builds for Meta XR Unity projects.
For a basic project that builds and runs on a Meta Quest headset, see the
Hello World tutorial.
To open the Build Settings window in Unity, navigate to File > Build Settings.
In the Build Settings window, the Scenes In Build pane displays a list of scenes from the project that Unity includes in the build.
To add scenes to the build, select the scenes you want to add, and then select Add Open Scenes.
To manage scenes, you can also do the following:
- To exclude a scene from the build, but not from the list of scenes, unselect the scene.
- To adjust the order of the scenes, drag them up or down the list. Numbers on the right indicate the scene index, which is mostly used in scripting APIs.
- To add scenes from a folder (the Assets folder, for example), drag the scenes into this window from the folder.
The target platform for Meta Quest headsets is Android, and the final build output is an .apk
file (Android executable).
Set the Unity build target to your headset:
- Under Platform, select Android, and then select Switch Platform. If the target platform is already set to Android, skip to the next step.
Open the drop-down list to the right of Run Device, and select your Meta Quest headset.
The device is listed only if it is connected to your computer over USB. If you do not see the headset in the list, ensure you have connected it properly and select Refresh.
Note: Select Development Build to test and debug the app. When you are ready for the final build, clear the selection as it may impact the app performance.
Generate, deploy, and run a build
To build your app, deploy it to your connected headset, and run it on the headset, click Build and Run and provide a location to save your build.
Note: The Build and Run option fails to generate a build if your device is not connected or has connection or detection issues.
Generate a build without deploying it
To build your app but not run it, click Build and provide a location to save your build. This option builds an .apk
Android executable file. It does not automatically deploy or run your app on the headset.
Unity’s build process is time-consuming, as it compiles the entire project instead of generating deltas from your previous build. To avoid building your app every time you want to test new changes,
we recommend using Link to stream the app directly to your headset as a PC VR app.
To reduce build times when building and deploying your app as a standalone app, do the following:
Stream app to your headset with Link
Link is a development tool that enables you to stream applications from your development machine directly to your headset, eliminating the need to build a project for your target device and deploy the app to your headset on each test run.
Note: Link makes your device behave like a PC VR headset until you turn the tool off. To speed up testing build time, we recommend using Link during XR application development, even if you only intend to release your app as a standalone headset app.
Note: Link is currently only supported on Windows. If you are developing on macOS, or developing without access to a headset, use
Meta XR Simulator.
To set up Link on your development machine:
- Download Link and install the app on your machine.
- Put on your headset.
- Open the Quick Settings window by selecting the clock on the left side of the menu bar.
- Open Settings, select System > Quest Link, and toggle Quest Link on.
- Select Launch Quest Link to start Link on your development machine and on your headset.