Permissions
Unity officially supports the Unity OpenXR: Spatial Entities package for Android XR and Meta Horizon OS. On both of these OpenXR runtimes, your app must request required permissions from the user before it can access any spatial data.
The following table lists the required permissions for Spatial Entities features:
| Runtime | Required permission | Features |
|---|---|---|
| Android XR | android.permission.SCENE_UNDERSTANDING_COARSE |
Planes, Markers, Anchors, Ray casts (planes) |
| Android XR | android.permission.SCENE_UNDERSTANDING_FINE |
Ray casts (depth only) |
| Meta Horizon OS | com.oculus.permission.USE_SCENE |
Planes, Markers, Anchors |
| Meta Horizon OS | com.oculus.permission.USE_ANCHOR_API |
Planes, Anchors |
Your app declares these permissions in its Android App Manifest, but not every permission produces a prompt. com.oculus.permission.USE_ANCHOR_API isn't an Android runtime permission, so Meta Horizon OS grants it automatically and the user never sees a prompt for it.
If your project uses AR Foundation's AR Plane Manager, AR Anchor Manager, AR Marker Manager, or AR Raycast Manager components, disable them until the user grants the necessary permission. After the user grants permission, you can safely enable these components.
Note
If your app targets an OpenXR runtime that isn't officially supported by Unity, refer to that runtime's documentation to understand if there are any required Android permissions.
Android XR permissions
The Android XR runtime defines two related permissions: android.permission.SCENE_UNDERSTANDING_COARSE (the COARSE permission) and android.permission.SCENE_UNDERSTANDING_FINE (the FINE permission). Both of these permissions protect access to sensitive information about the user's environment, to different degrees:
- COARSE grants your app basic understanding of the environment, which any Spatial Entities capability requires.
- FINE grants your app even more information, including capabilities such as depth texture access that you can use to digitally reconstruct the user's environment.
To respect users' privacy, request the minimum scene understanding permission necessary to achieve your app's goals. In this version of Unity OpenXR: Spatial Entities, the only capability that requires FINE access is the optional depth ray casts capability. If you're not using depth ray casts, request only the COARSE permission.
Finally, note that if the user grants your app the FINE permission, FINE access implies COARSE as well. You don't need to make a separate request for the COARSE permission.