# XRGeospatialFeature

This `OpenXRInteractionFeature` configures Android XR extensions `XR_ANDROID_geospatial` at runtime and provides [XRGeospatialManager](https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialManager#classGoogle_1_1XR_1_1Extensions_1_1XRGeospatialManager) to access geospatial capabilities.

## 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/XRGeospatialFeature#extensionstrings = "XR_EXT_future " + "XR_ANDROID_geospatial"` | `const string` The OpenXR Extension string. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialFeature#featureid = "com.google.xr.extensions.geospatial"` | `const string` The feature ID string. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialFeature#uiname = "Android XR: Geospatial"` | `const string` The UI name shows on the XR Plug-in Management panel, it helps users to understand validation errors and expected fixes. |

| ### Public static attributes ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialFeature#isextensionenabled => _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialFeature#requiredpermission = Permission.FineLocation` | `readonly string` Android runtime permission Permission.FineLocation is required for geospatial APIs. |

| ### Public functions ||
|---|---|
| `https://developer.android.com/develop/xr/unity/reference/class/Google/XR/Extensions/XRGeospatialFeature#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_EXT_future " +
            "XR_ANDROID_geospatial"
```
The OpenXR Extension string.

Used to check if this extensions is available or enabled.

### FeatureId

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

### UiName

```c#
const string UiName = "Android XR: Geospatial"
```
The UI name shows on the XR Plug-in Management panel, it helps 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_geospatial` extension is available on current device.

### RequiredPermission

```c#
readonly string RequiredPermission = Permission.FineLocation
```
Android runtime permission Permission.FineLocation is required for geospatial APIs.

## Public functions

### GetTargetVersion

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