OpenXRStructureBase
Native OpenXR parameter-structure chain.
RefCounted wrapper for an OpenXR extension-structure chain. Prefer existing concrete configuration/component classes. Next stores a reference without cycle protection; GetHeader visits the tail before calling the current _GetHeader.
Ulong addresses refer to native memory, not RIDs or safe managed data, and extend no lifetime. Base GetStructureType dereferences the returned header; native derived classes can return a constant even with a null header. Nonzero type therefore proves neither a valid pointer nor support. Never supply arbitrary addresses. An empty base object passes the tail pointer through and returns Unknown for a null header.
Own your resources and detach references after use; do not dispose provider-owned resources. Custom headers require correct layout/lifetime/pNext and separate native verification; an empty safe chain proves none of these.
Eleven bounded checks ran in Windows headless XR-off. Actual asynchronous operations, cancellation, session teardown, native allocation and headsets remain untested. Engine Source, Runtime and SDK unchanged.
Declarations checked against C# SDK 1.0.0. Expand a name to see declarations and documentation.
Constructors1
OpenXRStructureBaseConstructor
public OpenXRStructureBase();Creates a base RefCounted container for a native OpenXR structure chain. Next starts null; without a header implementation GetHeader(0)=0 and GetStructureType=Unknown. Not automatically a valid capability configuration. Release owned instances after detaching from requests/chains; do not Dispose provider-owned wrappers.
Properties1
NextProperty
public OpenXRStructureBase Next { get; set; }Next structure, or null. The setter stores a reference without copying native data or checking cycles. Never insert the same object twice or reference itself. Getter returns a borrowed wrapper; the entire chain must remain alive throughout its native use.
Methods5
GetHeaderulong
public ulong GetHeader(ulong next);Returns a native-header address as ulong. Visits Next first, then passes the resulting tail pointer to the current _GetHeader; without an override it passes that pointer through. Zero means no structure. A pointer, not a RID/size/ID: never invent values or retain it beyond resource lifetime. Invalid addresses can cause native memory faults.
| Name | Type | Default |
|---|---|---|
next | ulong | — |
nextTail native-structure address or zero; not a RID or arbitrary number. Structure lifetime must cover the call.
ulongReturns a native-header address as ulong. Visits Next first, then passes the resulting tail pointer to the current _GetHeader; without an override it passes that pointer through. Zero means no structure. A pointer, not a RID/size/ID: never invent values or retain it beyond resource lifetime. Invalid addresses can cause native memory faults.
GetNextOpenXRStructureBase
public OpenXRStructureBase GetNext();Next structure, or null. The setter stores a reference without copying native data or checking cycles. Never insert the same object twice or reference itself. Getter returns a borrowed wrapper; the entire chain must remain alive throughout its native use.
OpenXRStructureBaseNext structure, or null. The setter stores a reference without copying native data or checking cycles. Never insert the same object twice or reference itself. Getter returns a borrowed wrapper; the entire chain must remain alive throughout its native use.
GetStructureTypeulong
public ulong GetStructureType();Returns XrStructureType as ulong through native virtual dispatch. The base reads the header and returns Unknown (0) for null; derived classes can return a constant independently. OpenXRSpatialContextPersistenceConfig produced a nonzero type with GetHeader(0)=0. Never use type as pointer-validity/support proof; the base does not validate arbitrary header addresses.
ulongReturns XrStructureType as ulong through native virtual dispatch. The base reads the header and returns Unknown (0) for null; derived classes can return a constant independently. OpenXRSpatialContextPersistenceConfig produced a nonzero type with GetHeader(0)=0. Never use type as pointer-validity/support proof; the base does not validate arbitrary header addresses.
SetNextvoid
public void SetNext(OpenXRStructureBase entity);Next structure, or null. The setter stores a reference without copying native data or checking cycles. Never insert the same object twice or reference itself. Getter returns a borrowed wrapper; the entire chain must remain alive throughout its native use.
| Name | Type | Default |
|---|---|---|
entity | OpenXRStructureBase | — |
entityNext structure, or null. The setter stores a reference without copying native data or checking cycles. Never insert the same object twice or reference itself. Getter returns a borrowed wrapper; the entire chain must remain alive throughout its native use.
_GetHeaderulong
public virtual ulong _GetHeader(ulong next);Backend virtual implementation point: return an owned live OpenXR-header address whose pNext references the supplied next. Called by GetHeader after tail processing. A ulong neither pins managed memory nor defines layout; prefer existing native resource implementations. A custom allocated-memory override was not tested.
| Name | Type | Default |
|---|---|---|
next | ulong | — |
nextTail native-structure address or zero; not a RID or arbitrary number. Structure lifetime must cover the call.
ulongBackend virtual implementation point: return an owned live OpenXR-header address whose pNext references the supplied next. Called by GetHeader after tail processing. A ulong neither pins managed memory nor defines layout; prefer existing native resource implementations. A custom allocated-memory override was not tested.