OpenXRFutureResult
OpenXR asynchronous-operation status and Variant result.
RefCounted result returned by a capability, without a public constructor. Running/Finished/Cancelled describe processing rather than operation success; Finished is set before the decoder callback populates GetResultValue. Validate result type and value.
SDK 1.0.0 types Completed as OpenXRFutureResult, but native emits a Variant payload. Manual bool emission on the installed Runtime delivered bool to a Variant listener and null to the C# event. This reproduces signal conversion, not real asynchronous completion. Retain the original future and inspect GetStatus/GetResultValue rather than dereferencing the event argument.
SetResultValue does not complete requests. Cancellation changes local status; native cancellation failure proves no stopped operation. Consumers must not register fabricated handles or treat timeouts as unsupported hardware.
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.
Methods5
CancelFuturevoid
public void CancelFuture();Requests cancellation of a Running future through registered OpenXRFutureExtension. Requires a live session, active extension and registered handle; do not call for Finished/Cancelled. Local status becomes Cancelled and Completed receives Nil; native cancellation failure currently only warns, so local status does not prove device-side cancellation.
GetFutureulong
public ulong GetFuture();Returns native XrFutureEXT as ulong, not an operation result, RID or UUID. Intended for backend completion of a specific OpenXR operation; do not reuse after completion/cancellation. The getter neither checks liveness nor polls the runtime.
ulongReturns native XrFutureEXT as ulong, not an operation result, RID or UUID. Intended for backend completion of a specific OpenXR operation; do not reuse after completion/cancellation. The getter neither checks liveness nor polls the runtime.
GetResultValueVariant
public Variant GetResultValue();Reads the stored Variant result, initially Nil. Type/meaning depend on the operation, for example bool or RID. Finished does not mean success: validate VariantType, value and related object state. The value may still be Nil before the decoder callback; cancellation notification is no useful operation result.
VariantReads the stored Variant result, initially Nil. Type/meaning depend on the operation, for example bool or RID. Finished does not mean success: validate VariantType, value and related object state. The value may still be Nil before the decoder callback; cancellation notification is no useful operation result.
GetStatusOpenXRFutureResult.ResultStatus
public OpenXRFutureResult.ResultStatus GetStatus();Returns Running, Finished or Cancelled. Registry sets Finished before invoking the decoder callback, then emits Completed. Local lifecycle, not persistence/discovery success. A polling error can leave it Running; missing progress/timeouts do not establish unsupported hardware.
OpenXRFutureResult.ResultStatusReturns Running, Finished or Cancelled. Registry sets Finished before invoking the decoder callback, then emits Completed. Local lifecycle, not persistence/discovery success. A polling error can leave it Running; missing progress/timeouts do not establish unsupported hardware.
SetResultValuevoid
public void SetResultValue(Variant resultValue);Stores a Variant result slot; changes no status, completes no request and emits no Completed. Intended for a backend decoder callback after the operation-specific native Complete call. Consumers must not use it to fabricate success; the Callable return value is not automatically assigned here.
| Name | Type | Default |
|---|---|---|
resultValue | Variant | — |
resultValueStores a Variant result slot; changes no status, completes no request and emits no Completed. Intended for a backend decoder callback after the operation-specific native Complete call. Consumers must not use it to fabricate success; the Callable return value is not automatically assigned here.
Signals and events1
CompletedEvent
public event OpenXRFutureResult.CompletedEventHandler Completed;Signal after completion handling or cancellation. SDK declares an OpenXRFutureResult argument, but native emits result_value or Nil. On Runtime 1.0.0 a manually emitted bool reached a Variant listener as bool and the typed C# event as null. Do not dereference that argument as a future or use the typed event to read bool/RID results. Inspect the retained future with GetStatus/GetResultValue. Real asynchronous completion was not executed.
| Name | Type | Default |
|---|---|---|
result | OpenXRFutureResult | — |
resultSDK declares OpenXRFutureResult but native payload is result Variant/Nil; a bool produced null in the typed event. Do not treat the argument as a future.
OpenXRFutureResult.ResultStatus
| Value | Description |
|---|---|
Cancelled = 2 | The asynchronous function has been cancelled. |
Finished = 1 | The asynchronous function has finished. |
Running = 0 | The asynchronous function is running. |