Class SpatialMarkerFeature
Enables AR Foundation marker support via OpenXR Spatial Entities extensions.
Inheritance
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.SpatialEntities
Assembly: Unity.XR.SpatialEntities.dll
Syntax
public class SpatialMarkerFeature : SpatialSetupConfigurationProvider, IConfigurationAnalytic
Fields
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "com.unity.openxr.feature.arfoundation-spatialentities-marker"
Field Value
| Type | Description |
|---|---|
| string |
Properties
aprilTagConfigOptions
Configuration options for April tags.
Declaration
public AprilTagConfigOptions aprilTagConfigOptions { get; }
Property Value
| Type | Description |
|---|---|
| AprilTagConfigOptions |
arucoMarkerConfigOptions
Configuration options for ArUco markers.
Declaration
public ArucoMarkerConfigOptions arucoMarkerConfigOptions { get; }
Property Value
| Type | Description |
|---|---|
| ArucoMarkerConfigOptions |
microQRCodeConfigOptions
Configuration options for Micro QR codes.
Declaration
public MicroQRCodeConfigOptions microQRCodeConfigOptions { get; }
Property Value
| Type | Description |
|---|---|
| MicroQRCodeConfigOptions |
qrCodeConfigOptions
Configuration options for QR codes.
Declaration
public QRCodeConfigOptions qrCodeConfigOptions { get; }
Property Value
| Type | Description |
|---|---|
| QRCodeConfigOptions |
Methods
OnInstanceCreate(ulong)
Called after xrCreateInstance. Override this method to validate that any necessary OpenXR extensions were
successfully enabled
(OpenXRRuntime.IsExtensionEnabled)
and that any required system properties are supported. If this method returns false,
the feature's enabled property is set to false.
Declaration
protected override bool OnInstanceCreate(ulong xrInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrInstance | Handle of the native |
Returns
| Type | Description |
|---|---|
| bool | true if this feature successfully initialized. Otherwise, false. |
Overrides
Remarks
If this feature is a required feature of an enabled feature set, returning false here
causes the OpenXRLoader to fail, and XR Plug-in Management will fall back to another loader if enabled.
See Also
OnSessionDestroy(ulong)
Called before xrDestroySession.
Declaration
protected override void OnSessionDestroy(ulong xrSession)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrSession | The OpenXR session handle. |
Overrides
OnSubsystemCreate()
Called after the OpenXR Loader is initialized and has created its subsystems.
Declaration
protected override void OnSubsystemCreate()
Overrides
OnSubsystemDestroy()
Called before the OpenXR Loader destroys its subsystems.
Declaration
protected override void OnSubsystemDestroy()