# 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`, [`Google.XR.Extensions.IXRSpatialSdk`](https://developer.android.com/develop/xr/unity/reference/interface/Google/XR/Extensions/IXRSpatialSdk)

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#extensionstrings = "XR_ANDROID_composition_layer_passthrough_mesh " + "XR_ANDROID_passthrough_camera_state"` | `const string` The OpenXR Extension strings. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#featureid = "com.google.xr.extensions.passthrough_composition_layer"` | `const string` The feature ID string. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#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 ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#isextensionenabled => _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |

| ### Public static functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#getstate()` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrpassthroughcamerastates` Get the state of the passthrough camera. |

| ### Public functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#gettargetversion()` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrspatialsdkversions` Gets the target version of the given feature if applicable. |

## Public attributes

### ExtensionStrings

```c#
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

```c#
const string FeatureId = "com.google.xr.extensions.passthrough_composition_layer"
```
The feature ID string.

### UiName

```c#
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

### IsExtensionEnabled

```c#
bool IsExtensionEnabled => _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

```c#
XRPassthroughCameraStates GetState()
```
Get the state of the passthrough camera.


| Details ||
|---|---|
| **Returns** | The current state of the passthrough camera. |

## Public functions

### GetTargetVersion

```c#
XRSpatialSdkVersions GetTargetVersion()
```
Gets the target version of the given feature if applicable.