OpenXRFutureExtension
Backend registry and processing of OpenXR futures.
Engine-registered Object for backend OpenXR asynchronous requests. Consumers get futures from capabilities; extension implementations use RegisterFuture only after obtaining a real XrFutureEXT. onSuccess decodes a native result rather than starting an operation.
Do not construct wrappers to obtain a singleton: the constructor changes an internal global pointer. Do not free the engine-registered object. IsActive means XR_EXT_future/functions availability, not readiness of a particular request. Poll errors leave Running; handle errors and session lifetime.
The Finished callback receives OpenXRFutureResult itself, unlike the problematic Completed signal carrying the payload. Isolated XR-off execution covered registry metadata only; cancellation, real handles and runtime processing were not executed.
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
OpenXRFutureExtensionConstructor
public OpenXRFutureExtension();Creates an owned native wrapper Object rather than retrieving the registered singleton. Constructor replaces an internal singleton pointer; do not construct one to query support in an application. Use the engine-registered object without freeing it. An isolated diagnostic instance is test-owned and requires Free rather than Dispose alone.
Methods3
CancelFuturevoid
public void CancelFuture(ulong future);Cancels a registered native handle, not an arbitrary number. Requires a live OpenXR instance and working cancel function. After the attempt the local future becomes Cancelled and leaves the registry even if native cancellation failed. Guarantees no reversal of started side effects; this path was not executed in XR-off.
| Name | Type | Default |
|---|---|---|
future | ulong | — |
futureLive XrFutureEXT for an already started operation, never a fabricated ulong; the method does not validate handle semantics.
IsActivebool
public bool IsActive();True for active XR_EXT_future with resolved poll/cancel functions. Starts no session and proves no particular asynchronous-operation support. Query the registered wrapper after OpenXR startup; a new diagnostic XR-off wrapper returned false.
boolTrue for active XR_EXT_future with resolved poll/cancel functions. Starts no session and proves no particular asynchronous-operation support. Query the registered wrapper after OpenXR startup; a new diagnostic XR-off wrapper returned false.
RegisterFutureOpenXRFutureResult
public OpenXRFutureResult RegisterFuture(ulong future, Callable onSuccess = default);Backend API for a handle already returned by a real OpenXR asynchronous request. Starts no operation and does not validate the handle: isolated XR-off execution registered zero as Running. Never pass fabricated/reused handles. onSuccess receives OpenXRFutureResult, performs the operation-specific native Complete and calls SetResultValue. Consumers normally obtain futures from capabilities rather than calling this.
| Name | Type | Default |
|---|---|---|
future | ulong | — |
onSuccess | Callable | default |
futureLive XrFutureEXT for an already started operation, never a fabricated ulong; the method does not validate handle semantics.
onSuccessBackend decoder callback with one OpenXRFutureResult argument, after Finished and before Completed. Perform native Complete and SetResultValue; not called on cancellation.
OpenXRFutureResultBackend API for a handle already returned by a real OpenXR asynchronous request. Starts no operation and does not validate the handle: isolated XR-off execution registered zero as Running. Never pass fabricated/reused handles. onSuccess receives OpenXRFutureResult, performs the operation-specific native Complete and calls SetResultValue. Consumers normally obtain futures from capabilities rather than calling this.