# XRSessionFeature

This `OpenXRInteractionFeature` provides Android XR session management for all extended Android XR features, and common session configurations.

It also provides Android XR implementation of `XRSessionSubsystem` if there is no session subsystem available.

## Summary

### Inheritance

Inherits from: `OpenXRFeature`

| ### Public attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#extensionstrings = ""` | `const string` The OpenXR Extension string. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#featureid = "com.google.xr.extensions.session_management"` | `const string` The feature ID string. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#immersivexr = true` | `bool` A boolean that indicates the activity starts in XR Immersive mode, and will be launched in full-screen mode. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#targetapiversion => _spatialApiTargetVersion` | `https://developer.android.com/develop/xr/unity/reference/namespace/Google/XR/Extensions#xrspatialsdkversions` Gets the target XR Spatial API level. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#uiname = "Android XR (Extensions): Session Management"` | `const string` The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#usexrspatialapi => _useSpatialApi` | `bool` Gets property if XR Spatial API is in use. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#xrspatailapirequired => _spatialApiRequired` | `bool` Gets property whether the XR Spatial API is required. |

| ### Properties ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#vulkansubsampling` | `bool` Gets or sets a value indicating whether to enable the usage of Vulkan Subsampling. |

## Public attributes

### ExtensionStrings

```c#
const string ExtensionStrings = ""
```
The OpenXR Extension string.

Used to check if this extensions is available or enabled.

### FeatureId

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

### ImmersiveXR

```c#
bool ImmersiveXR = true
```
A boolean that indicates the activity starts in XR Immersive mode, and will be launched in full-screen mode.

### TargetApiVersion

```c#
XRSpatialSdkVersions TargetApiVersion => _spatialApiTargetVersion
```
Gets the target XR Spatial API level.

Note: This field only takes effect when [UseXRSpatialApi](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#usexrspatialapi) has set to true.

### UiName

```c#
const string UiName = "Android XR (Extensions): Session Management"
```
The UI name shows on the XR Plug-in Management panel, help users to understand validation errors and expected fixes.

### UseXRSpatialApi

```c#
bool UseXRSpatialApi => _useSpatialApi
```
Gets property if XR Spatial API is in use.

### XRSpatailApiRequired

```c#
bool XRSpatailApiRequired => _spatialApiRequired
```
Gets property whether the XR Spatial API is required.

Note: This field only takes effect when [UseXRSpatialApi](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRSessionFeature#usexrspatialapi) has set to true.

## Properties

### VulkanSubsampling

```c#
bool VulkanSubsampling
```
Gets or sets a value indicating whether to enable the usage of Vulkan Subsampling.

Note: To toggle Vulkan Subsampling at runtime, you can set this field with `true` in Editor so the project can build with necessary BootConfig, then toggle this property at runtime.