SpatialShareableAnchorFeature

Enables AR Foundation shareable anchor support via OpenXR Spatial Entities extensions.

Summary

Inheritance

Inherits from: AndroidXRSpatialEntityFeature, Google.XR.Extensions.IXRSpatialSdk

Public attributes

ExtensionStrings = Constants.ANDROID_geospatial + " " + Constants.ANDROID_geospatial_anchor + " " + Constants.EXT_future + " " + Constants.EXT_spatial_entity + " " + Constants.EXT_spatial_anchor + " " + Constants.EXT_spatial_persistence + " " + Constants.EXT_spatial_persistence_operations
const string
The OpenXR Extension string.
FeatureId = "com.google.xr.extensions.spatialentities.shareable_anchor"
const string
The feature ID string.
UiName = "Spatial Entities (Extensions): Shareable Anchors"
const string
The UI name shows on the XR Plug-in Management panel, helps users to understand validation errors and expected fixes.

Public static attributes

RequiredPermission = AndroidXRPermission.SceneUnderstandingCoarse
Runtime permission required to enable shareable anchors.

Properties

EnableGeospatialHost
bool
Editor helper to enable or disable the geospatial host from scripts.
IsAnchorExtensionEnabled
static bool
Gets if the basic anchor support is enabled.
IsGeospatialHostSupported
static bool
Gets if the required extension for XRShareableAnchorHosts.Geospatial is enabled and supported.

Public functions

GetTargetVersion()
Gets the target version of the given feature if applicable.

Public attributes

ExtensionStrings

const string ExtensionStrings =
            Constants.ANDROID_geospatial + " " +
            Constants.ANDROID_geospatial_anchor + " " +
            Constants.EXT_future + " " +
            Constants.EXT_spatial_entity + " " +
            Constants.EXT_spatial_anchor + " " +
            Constants.EXT_spatial_persistence + " " +
            Constants.EXT_spatial_persistence_operations

The OpenXR Extension string.

Used to check if these extensions are available or enabled.

FeatureId

const string FeatureId =
            "com.google.xr.extensions.spatialentities.shareable_anchor"

The feature ID string.

UiName

const string UiName = "Spatial Entities (Extensions): Shareable Anchors"

The UI name shows on the XR Plug-in Management panel, helps users to understand validation errors and expected fixes.

Public static attributes

RequiredPermission

readonly AndroidXRPermission RequiredPermission =
            AndroidXRPermission.SceneUnderstandingCoarse

Runtime permission required to enable shareable anchors.

Properties

EnableGeospatialHost

bool EnableGeospatialHost

Editor helper to enable or disable the geospatial host from scripts.

IsAnchorExtensionEnabled

static bool IsAnchorExtensionEnabled

Gets if the basic anchor support is enabled.

When OpenXR runtime is waiting, it returns null. Otherwise, it indicates whether spatial anchor and relevant extensions are available at runtime.

IsGeospatialHostSupported

static bool IsGeospatialHostSupported

Gets if the required extension for XRShareableAnchorHosts.Geospatial is enabled and supported.

Public functions

GetTargetVersion

XRSpatialSdkVersions GetTargetVersion()

Gets the target version of the given feature if applicable.

Details
Returns
The target version to meet feature requirements.