OpenXRAnchorTracker
Anchor tracker with persistence UUID metadata.
Anchor spatial tracker. Uuid reads as 32 hex characters without hyphens or an empty string. HasUuid checks nonzero bytes, not the persistence store. Manual SetUuid creates, saves and restores no actual binding. Use the UUID from successful PersistAnchor or detected persistent-anchor data.
Save UUID with your application content data. To delete, successfully UnpersistAnchor before RemoveAnchor; deleting XRAnchor3D removes only the view. Also validate inherited state/pose.
Executed example and setup. Windows headless XR-off covered synthetic metadata/client logic: 23 API cases and an earlier 20 helper checks. Real discovery, entity/context RIDs, persistence, headsets and imagery remain untested. Do not dispose provider-owned trackers/poses/cached wrappers; dispose a newly owned tracker after use.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRAnchorTrackerConstructor
public OpenXRAnchorTracker();Creates a caller-owned RefCounted tracker without starting OpenXR, registering with XRServer or detecting anything. Base state is Paused, category Anchor, entity/context RIDs empty. Real applications normally use the borrowed provider-registered tracker rather than a synthetic resource. Release your own instance after removing owned references/registration.
Properties1
UuidProperty
public string Uuid { get; set; }Persistent-anchor UUID metadata: 32 hexadecimal characters without hyphens, lowercase on read; no UUID is an empty string. The setter changes metadata and UuidChanged only; it persists/restores no binding. Use successful PersistAnchor/discovery values. Validate input yourself: the native parser warns about invalid format without strict rejection.
Methods3
GetUuidstring
public string GetUuid();Persistent-anchor UUID metadata: 32 hexadecimal characters without hyphens, lowercase on read; no UUID is an empty string. The setter changes metadata and UuidChanged only; it persists/restores no binding. Use successful PersistAnchor/discovery values. Validate input yourself: the native parser warns about invalid format without strict rejection.
stringPersistent-anchor UUID metadata: 32 hexadecimal characters without hyphens, lowercase on read; no UUID is an empty string. The setter changes metadata and UuidChanged only; it persists/restores no binding. Use successful PersistAnchor/discovery values. Validate input yourself: the native parser warns about invalid format without strict rejection.
HasUuidbool
public bool HasUuid();True if any stored UUID byte is nonzero, initially false. Checks neither the persistence store, current tracking nor restoration success; a manually assigned UUID also makes it true.
boolTrue if any stored UUID byte is nonzero, initially false. Checks neither the persistence store, current tracking nor restoration success; a manually assigned UUID also makes it true.
SetUuidvoid
public void SetUuid(string uuid);Persistent-anchor UUID metadata: 32 hexadecimal characters without hyphens, lowercase on read; no UUID is an empty string. The setter changes metadata and UuidChanged only; it persists/restores no binding. Use successful PersistAnchor/discovery values. Validate input yourself: the native parser warns about invalid format without strict rejection.
| Name | Type | Default |
|---|---|---|
uuid | string | — |
uuidPersistent-anchor UUID metadata: 32 hexadecimal characters without hyphens, lowercase on read; no UUID is an empty string. The setter changes metadata and UuidChanged only; it persists/restores no binding. Use successful PersistAnchor/discovery values. Validate input yourself: the native parser warns about invalid format without strict rejection.
Signals and events1
UuidChangedEvent
public event Action UuidChanged;Stored UUID-byte change, including clearing. Equal values emit nothing. Inspect HasUuid and operation state; the signal alone confirms no runtime-store persistence.