Configure project settings
Use the Project Settings window to enable OpenXR:Android XR features and add the Oculus Touch Controller Profile to your project.
Prerequisites
You must have the Android module installed in the version of the Unity Editor you're using. Refer to Add modules for more information.
Enable Unity OpenXR: Android XR
To enable Unity OpenXR: Android XR in your project, follow these steps:
- Go to Edit > Project Settings > XR Plug-in Management. If you don't already have it installed, click Install XR Plug-in Management.
- In the Android tab, under Plug-in Providers, enable OpenXR.
- While still in the Project Settings window, go to XR Plug-in Management > OpenXR.
- Under OpenXR Feature Groups, enable the Android XR feature group.
- To enable only the features relevant to your project, click on the Android XR feature group, and select the relevant features.
Important
You must enable the Android XR: AR Session feature for your project to work correctly.
The Android XR OpenXR feature group, shown with all features enabled.
Note
XR Plug-in Management supports only one enabled plug-in provider at a time per build target. If your project also targets ARCore using the Google ARCore XR Plug-in, to avoid errors you should disable the Google ARCore plug-in provider in the Android tab of Project Settings > XR Plug-in Management before you build an APK for Android XR devices. Likewise, you should disable OpenXR before you build for ARCore.
Configure interaction profiles
For Android XR projects using controller input, you should add the Oculus Touch Controller Profile. If you're using Eye tracking and foveated rendering features in your project, you should also add the Eye Gaze Interaction profile.
To add the Oculus Touch Controller Profile and the Eye Gaze Interaction profile:
- Go to Edit > Project Settings > XR Plug-in Management.
- In the Android tab, under Plug-in Providers, enable OpenXR.
- While still in the Project Settings window, go to XR Plug-in Management > OpenXR.
- In the Android tab, under Enabled Interaction Profiles, add Oculus Touch Controller Profile and Eye Gaze Interaction profile.
The Oculus Touch Controller Profile and Eye Gaze Interaction Profile are enabled.
Pop-up windows
Most Android XR apps require the activity window to be resizable so that pop-ups such as system permission requests can be rendered. To make sure pop-up windows are rendered properly, go to Edit > Project Settings > Player, then select the Android tab and enable Resizeable Activity. (In earlier versions of Unity, this setting was named Resizable Window.)