This section describes how to configure build settings in Unity. The build workflow mainly comprises selecting the build platform such as Android or Windows, adding scenes, configuring VR support, and building the app. In addition, you can configure quality and rendering settings to optimize the build time and app performance.
Build settings let you set the target platform, configure build-related settings, and start the build process. We recommend that you set the app’s target platform, such as Windows or Android, prior to performing any other project settings as there are a variety of settings that depend on it.
The target platform for Oculus devices that run on Windows, such as Oculus Rift and Oculus Rift S, is PC, Mac & Linux Standalone, and builds a .exe file.
Click Switch Platform, if the target platform was different than PC, Mac & Linux Standalone.
The target platform for Oculus devices such as Oculus Quest that run Android is Android and builds an .apk file.
Click Switch Platform.
The Scenes In Build pane displays a list of scenes from your project that Unity includes in the build.
Prior to building your app, there are a variety of additional settings you should consider. These settings define VR support, add package details to uniquely identify your app in the Oculus store, and optimize app performance. If you’ve followed instructions outlined in Configure Settings, you can skip this step.
Before you generate the final build, we highly recommend that you strip unused shaders, which significantly reduces the build time.
To generate the final build, also known as Player, you’ve two options:
The Build and Run option requires you to connect the Oculus device to your computer over a USB-C cable. As mentioned in step 4 of Select Build Platform, select the device from the Run Device list. If your device is not connected or has connection or detection issues, the Build and Run option fails in generating build.
Before you are ready for the final build, your app undergoes many changes, which often require you to build the app for testing purposes. In general, Unity’s build options are time consuming as it compiles the entire project instead of using delta.
If your purpose of building app is to test changes, we highly recommend that you use OVR Build APK and Run and OVR Quick Scene Preview. These tools are specifically designed for Android apps and significantly expedites build iterations. When you’re ready for your final build, you can then use Unity’s Build or Build and Run option.
To run your app that is pending Oculus review, the Oculus device must allow apps from unknown sources.