OpenXRSpatialComponentPersistenceList
Spatial snapshot data: OpenXRSpatialComponentPersistenceList.
Native component-data container for QuerySnapshot, not a tracker, game Entity or ready geometry. OpenXRSpatialQueryResultData must be first in a query array; other components use the same row indices. Validate component support, successful query and row state before reading.
SetCapacity allocates memory rather than device data. Query-result GetCapacity reports allocated array length and can be nonzero without any query. Never consume stale storage after a failed/incomplete query. Final output counts are not separately public between the two passes; changing runtime result counts was not tested.
Buffer getters need the same live snapshot. Copy needed arrays/strings before FreeSpatialSnapshot or the end of a borrowed capability callback. Never double-free that snapshot; keep owned containers alive through use. Raw poses are not ready GlobalTransform values and do not automatically apply WorldOrigin/reference frame/WorldScale.
Raw XrSpatialPersistenceStateEXT as ulong, without a dedicated C# enum in the current SDK. Requires a successfully filled persistence row; never cast to EntityTrackingState/ResultStatus. Persistence metadata state, not an operation-success bool. Invalid indexing yields MAX_ENUM sentinel.
Integration guide. Eleven Windows XR-off checks covered metadata/capacity/virtual dispatch without reading unfilled memory. Real snapshots, buffer values, pose/UUID/marker decoding, headsets and export remain untested. Engine unchanged.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRSpatialComponentPersistenceListConstructor
public OpenXRSpatialComponentPersistenceList();Creates a caller-owned RefCounted query-data container with empty buffers. Performs no QuerySnapshot and receives no device data. SetCapacity allocates without filling rows. Keep owned containers alive through native query use; do not dispose provider-owned resources.
Methods2
GetPersistentStateulong
public ulong GetPersistentState(long index);Raw XrSpatialPersistenceStateEXT as ulong, without a dedicated C# enum in the current SDK. Requires a successfully filled persistence row; never cast to EntityTrackingState/ResultStatus. Persistence metadata state, not an operation-success bool. Invalid indexing yields MAX_ENUM sentinel.
| Name | Type | Default |
|---|---|---|
index | long | — |
indexZero-based filled-row index from the same successful snapshot query, not entity ID. Matches OpenXRSpatialQueryResultData; allocated capacity alone is insufficient.
ulongRaw XrSpatialPersistenceStateEXT as ulong, without a dedicated C# enum in the current SDK. Requires a successfully filled persistence row; never cast to EntityTrackingState/ResultStatus. Persistence metadata state, not an operation-success bool. Invalid indexing yields MAX_ENUM sentinel.
GetPersistentUuidstring
public string GetPersistentUuid(long index);Filled persistence-row UUID: 32 lowercase hex characters without hyphens; zero bytes produce empty text. Use to correlate application content across discovery within the supported scope. Persists/restores nothing; empty output after an indexing error proves no successful deletion.
| Name | Type | Default |
|---|---|---|
index | long | — |
indexZero-based filled-row index from the same successful snapshot query, not entity ID. Matches OpenXRSpatialQueryResultData; allocated capacity alone is insufficient.
stringFilled persistence-row UUID: 32 lowercase hex characters without hyphens; zero bytes produce empty text. Use to correlate application content across discovery within the supported scope. Persists/restores nothing; empty output after an indexing error proves no successful deletion.