Partager via


OpenXRContext Class

Definition

Retrieve the current OpenXR instance, session handles and states.

public class OpenXRContext
type OpenXRContext = class
Public Class OpenXRContext
Inheritance
OpenXRContext

Properties

Current

Get the current OpenXR context.

Instance

The XrInstance handle, or 0 when instance is not initialized.

IsSessionRunning

Whether the current XrSession is running, i.e. when the frame loop is in progress.

PFN_xrGetInstanceProcAddr

Get the function pointer to PFN_xrGetInstanceProcAddr that includes Unity OpenXR plugin and features overrides. Returns 0 when XR is not loaded in Unity or xrInstance handle above is 0.

SceneOriginSpace

An XrSpace handle to the reference space of the current Unity scene origin, or 0 when not available. It's typically a LOCAL, a STAGE or an UNBOUNDED reference space handle when available.

Session

The XrSession handle, or 0 when session is not created.

SystemId

The XrSystemId, or 0 when system is not available.

Applies to