OpenXRSpatialComponentMarkerList
Spatial snapshot data: OpenXRSpatialComponentMarkerList.
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.
Copies row payload from the same live snapshot: String/PackedByteArray for matching buffer types, otherwise Nil. Requires a successful query and MarkerType; not always QR text and not MarkerId. Validate VariantType and map allowed application identifiers rather than arbitrary paths/code.
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
OpenXRSpatialComponentMarkerListConstructor
public OpenXRSpatialComponentMarkerList();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.
Methods3
GetMarkerDataVariant
public Variant GetMarkerData(Rid snapshot, long index);Copies row payload from the same live snapshot: String/PackedByteArray for matching buffer types, otherwise Nil. Requires a successful query and MarkerType; not always QR text and not MarkerId. Validate VariantType and map allowed application identifiers rather than arbitrary paths/code.
| Name | Type | Default |
|---|---|---|
snapshot | Rid | — |
index | long | — |
snapshotLive snapshot RID for this exact result; copy buffer data before freeing it. IsValid does not verify a live owner.
indexZero-based filled-row index from the same successful snapshot query, not entity ID. Matches OpenXRSpatialQueryResultData; allocated capacity alone is insufficient.
VariantCopies row payload from the same live snapshot: String/PackedByteArray for matching buffer types, otherwise Nil. Requires a successful query and MarkerType; not always QR text and not MarkerId. Validate VariantType and map allowed application identifiers rather than arbitrary paths/code.
GetMarkerIduint
public uint GetMarkerId(long index);Numeric uint marker ID from a filled row. Match ArUco/AprilTag type and dictionary together with ID. Zero alone can be valid and is no UUID/payload; invalid indexing also returns zero with an error.
| 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.
uintNumeric uint marker ID from a filled row. Match ArUco/AprilTag type and dictionary together with ID. Zero alone can be valid and is no UUID/payload; invalid indexing also returns zero with an error.
GetMarkerTypeOpenXRSpatialComponentMarkerList.MarkerType
public OpenXRSpatialComponentMarkerList.MarkerType GetMarkerType(long index);Maps the row runtime capability to Qrcode, MicroQrcode, Aruco, AprilTag or Unknown. Not a direct cast of arbitrary capability IDs and proves no decoded payload. Handle Unknown and validate state before using other data.
| 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.
OpenXRSpatialComponentMarkerList.MarkerTypeMaps the row runtime capability to Qrcode, MicroQrcode, Aruco, AprilTag or Unknown. Not a direct cast of arbitrary capability IDs and proves no decoded payload. Handle Unknown and validate state before using other data.
OpenXRSpatialComponentMarkerList.MarkerType
| Value | Description |
|---|---|
AprilTag = 4 | Marker based on an April Tag. |
Aruco = 3 | Marker based on an ArUco code. |
Max = 5 | Maximum value for this enum. |
MicroQrcode = 2 | Marker based on a micro QR code. |
Qrcode = 1 | Marker based on a QR code. |
Unknown = 0 | Unknown or unset marker type. |