# 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](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.                                                                                        |
| [FeatureId](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.                                                                                               |
| [UiName](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                                                                                                   ||
|------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------|
| [IsExensionEnabled](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRPassthroughFeature#isexensionenabled)` => _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |

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

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

### IsExensionEnabled

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

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


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