Build and Upload Android Applications

This section describes the process to configure and build Unity applications targeted at Android platforms.

Android Manifest

During the build process, Unity projects with VR support enabled are packaged with an automatically-generated manifest which is configured to meet our requirements (landscape orientation, vr_only, et cetera). All other values, such as Entitlement Check settings, are not modified. Do not add the noHistory attribute to your manifest.

To build an application for submission to the Oculus Store, you must build a custom manifest using the Oculus Integration.

Using Unity’s URP

Unity’s Universal Render Pipeline (URP) allows you to control to modify the render pass of your application. See Unity’s documentation about how to use (or upgrade) and modify the URP - https://docs.unity3d.com/Packages/com.unity.render-pipelines.lightweight@5.3/manual/index.html

For Oculus development, we recommend that developer use the linear color space. The gamma color space is supported, but not recommended. Oculus runtimes support sRGB textures, using the linear color space and leveraging hardware sRGB for the conversion is the recommended configuration.

We recommend that developers do not use any post-processing. There is a measurable performance cost to any post-processing pass.

Build Settings

From the File menu, select Build Settings…. Select Android as the platform. Set Texture Compression to ASTC.

We recommend unchecking Development Build for your final build, as it may impact performance.

Player Settings

  1. Click the Player Settings… button and select the Android tab.
  1. Set a Bundle Identifier under Identification in Other Settings.
  2. Select Virtual Reality Supported under Rendering in Other Settings.

All required settings are enforced automatically, but you may wish to make additional settings as appropriate. For example, Multithreaded Rendering, where the engine will move graphics API calls from the main thread to a separate worker thread, and Low Overhead Mode, where the engine will skip error checking in release versions of an app (only on apps using OpenGL ES).

For more information on our recommended settings, see the Best Practices for Rift and Mobile section.

Quality Settings

Navigate to Edit > Project Settings > Quality. We recommend the following settings:

SettingValue
Pixel Light Count1
Texture QualityFull Res
Anisotropic TexturesPer Texture
Anti Aliasing2x or 4x Multi Sampling
Soft ParticlesDeselect
Realtime Reflections ProbesSelect
Billboards Face CameraSelect

The Anti-aliasing setting is particularly important. It must be increased to compensate for stereo rendering, which reduces the effective horizontal resolution by 50%. An anti-aliasing value of 2X is ideal, 4x may be used if you have performance to spare. We do not recommend 8x.

For more information on our recommended settings, see Best Practices for Rift and Mobile.

Sideloading Unity Applications

You may build an APK locally and sideload it to your phone. For information on getting development builds on your device, please review the Device Setup - Oculus Go page in the Mobile SDK guide.

Build Tools

Oculus provides the OVR Build APK and Run and OVR Scene Quick Preview tools to reduce the time required to build and deploy APK and scenes on your Android device. See the Unity Build Tools page for details.

Upload your Android Application

The Oculus Unity Integration provides the OVRPlatform Tool that you can use to upload your app to Oculus. You can upload development builds to a pre-production release channel, or your final build for Store Review. The OVRPlatform Tool uses the Oculus Platform Command Line Utility.

For information about uploading your apps to a Release Channel or Store using the Oculus Dashboard, please see the Uploading Android Apps page.

To use the OVRPlatform Tool, open the diaglog by selecting Oculus / Tools / Oculus Platform Tool.

Review Oculus Platform Command Line Utility for information about the parameters in the OVRPlatform Tool dialog.