Class SpatialImageDatabase
The OpenXR runtime representation of an UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary.
Implements
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.SpatialEntities
Assembly: Unity.XR.SpatialEntities.dll
Syntax
public class SpatialImageDatabase : RuntimeReferenceImageLibrary, IReferenceImageLibrary
Remarks
Exposes the source reference images to AR Foundation, and wraps the
XrSpatialImageTrackingDatabaseEXT handle the OpenXR runtime tracks them with.
Create an instance with SpatialImageTrackingSubsystem.TryCreateRuntimeLibraryAsync, and destroy it with TryDestroyImageDatabase(SpatialImageDatabase) to release the underlying native resources.
Properties
count
The number of reference images contained in this database.
Declaration
public override int count { get; }
Property Value
| Type | Description |
|---|---|
| int |
Overrides
movingImageType
The MovingImageType copied from the source UnityEngine.XR.ARSubsystems.XRReferenceImageLibrary. Used
as the database-wide default.
Declaration
public MovingImageType movingImageType { get; }
Property Value
| Type | Description |
|---|---|
| MovingImageType |
nativeHandle
The native XrSpatialImageTrackingDatabaseEXT handle, or 0 if this database is empty
or has not been created yet.
Declaration
public ulong nativeHandle { get; }
Property Value
| Type | Description |
|---|---|
| ulong |
Methods
GetReferenceImageAt(int)
Get the reference image at the given index.
Declaration
protected override XRReferenceImage GetReferenceImageAt(int index)
Parameters
| Type | Name | Description |
|---|---|---|
| int | index | The index of the reference image to get. AR Foundation validates that |
Returns
| Type | Description |
|---|---|
| XRReferenceImage | The reference image at |