The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
XRPassthroughFeature
This OpenXRInteractionFeature
configures the XR_ANDROID_composition_layer_passthrough_mesh
and XR_ANDROID_passthrough_camera_state
extensions at OpenXR runtime and provides passthrough geometry capabilities in the OpenXR platform.
Use Unity.XR.CompositionLayers.CompositionLayer
with Passthrough layer type to access passthrough cutout at runtime. Note: a valid MeshFilter.mesh
is required to configure the layer geometry.
Summary
Inheritance
Inherits from:
OpenXRFeature
Public attributes
|
ExtensionStrings =
"XR_ANDROID_composition_layer_passthrough_mesh " +
"XR_ANDROID_passthrough_camera_state"
|
const string
The OpenXR Extension strings.
|
FeatureId = "com.google.xr.extensions.passthrough_composition_layer"
|
const string
The feature ID string.
|
UiName = "Android XR (Extensions): Passthrough Composition Layer"
|
const string
The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes.
|
Public static attributes
|
IsExensionEnabled => _extensionEnabled
|
bool
Gets if the required OpenXR extension is enabled.
|
Public static functions
|
GetState()
|
Get the state of the passthrough camera.
|
Public attributes
ExtensionStrings
const string ExtensionStrings =
"XR_ANDROID_composition_layer_passthrough_mesh " +
"XR_ANDROID_passthrough_camera_state"
The OpenXR Extension strings.
Used to check if this extensions is available or enabled.
FeatureId
const string FeatureId = "com.google.xr.extensions.passthrough_composition_layer"
UiName
const string UiName = "Android XR (Extensions): Passthrough Composition Layer"
The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes.
Public static attributes
IsExensionEnabled
bool IsExensionEnabled => _extensionEnabled
Gets if the required OpenXR extension is enabled.
When OpenXR runtime is waiting, it returns null
. Otherwise, it indicates whether the XR_ANDROID_composition_layer_passthrough_mesh
extension is enabled.
Public static functions
GetState
XRPassthroughCameraStates GetState()
Get the state of the passthrough camera.
Details |
Returns
|
The current state of the passthrough camera.
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2025-05-08 UTC.
[null,null,["Last updated 2025-05-08 UTC."],[],[],null,["# XRPassthroughFeature Class Reference\n\nXRPassthroughFeature\n====================\n\nThis `OpenXRInteractionFeature` configures the `XR_ANDROID_composition_layer_passthrough_mesh` and `XR_ANDROID_passthrough_camera_state` extensions at OpenXR runtime and provides passthrough geometry capabilities in the OpenXR platform.\n\nUse `Unity.XR.CompositionLayers.CompositionLayer` with Passthrough layer type to access passthrough cutout at runtime. Note: a valid `MeshFilter.mesh` is required to configure the layer geometry.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `OpenXRFeature`\n\n| ### Public attributes ||\n|------------------------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| [ExtensionStrings](#extensionstrings)` = \"XR_ANDROID_composition_layer_passthrough_mesh \" + \"XR_ANDROID_passthrough_camera_state\"` | `const string` The OpenXR Extension strings. |\n| [FeatureId](#featureid)` = \"com.google.xr.extensions.passthrough_composition_layer\"` | `const string` The feature ID string. |\n| [UiName](#uiname)` = \"Android XR (Extensions): Passthrough Composition Layer\"` | `const string` The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes. |\n\n| ### Public static attributes ||\n|----------------------------------------------------------------|----------------------------------------------------------|\n| [IsExensionEnabled](#isexensionenabled)` =\u003e _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |\n\n| ### Public static functions ||\n|---------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| [GetState](#getstate)`()` | [XRPassthroughCameraStates](/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrpassthroughcamerastates) Get the state of the passthrough camera. |\n\nPublic attributes\n-----------------\n\n### ExtensionStrings\n\n```c#\nconst string ExtensionStrings =\n \"XR_ANDROID_composition_layer_passthrough_mesh \" +\n \"XR_ANDROID_passthrough_camera_state\"\n``` \nThe OpenXR Extension strings.\n\nUsed to check if this extensions is available or enabled. \n\n### FeatureId\n\n```c#\nconst string FeatureId = \"com.google.xr.extensions.passthrough_composition_layer\"\n``` \nThe feature ID string. \n\n### UiName\n\n```c#\nconst string UiName = \"Android XR (Extensions): Passthrough Composition Layer\"\n``` \nThe UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes.\n\nPublic static attributes\n------------------------\n\n### IsExensionEnabled\n\n```c#\nbool IsExensionEnabled =\u003e _extensionEnabled\n``` \nGets if the required OpenXR extension is enabled.\n\nWhen OpenXR runtime is waiting, it returns `null`. Otherwise, it indicates whether the `XR_ANDROID_composition_layer_passthrough_mesh` extension is enabled.\n\nPublic static functions\n-----------------------\n\n### GetState\n\n```c#\nXRPassthroughCameraStates GetState()\n``` \nGet the state of the passthrough camera.\n\n\n| Details ||\n|-------------|----------------------------------------------|\n| **Returns** | The current state of the passthrough camera. |"]]