Class OpenXRFeature
A Unity OpenXR Feature. This class can be inherited from to add feature specific data and logic. Feature-specific settings are serialized for access at runtime.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features
Assembly: solution.dll
Syntax
[Serializable]
public abstract class OpenXRFeature : ScriptableObject
Properties
| Name | Description |
|---|---|
| enabled | Feature is enabled and will be started when the OpenXR loader is initialized. Note that the enabled state of a feature cannot be modified once OpenXR is initialized and can be used at runtime to determine if a feature successfully initialized. |
| xrGetInstanceProcAddr | Accessor for xrGetInstanceProcAddr function pointer. |
Methods
| Name | Description |
|---|---|
| Awake() | |
| CreateSubsystem<TDescriptor, TSubsystem>(List<TDescriptor>, string) | Creates a subsystem based on a given a list of descriptors and a specific subsystem id. Promoted to public for extensions. |
| DestroySubsystem<T>() | Destroys a subsystem instance of a given type. Subsystem is assumed to already be loaded from a previous call to CreateSubsystem. Promoted to public for extensions. |
| GetAction(InputAction) | Returns XrAction handle bound to the given InputAction. |
| GetCurrentAppSpace() | Returns the current app space. |
| GetCurrentInteractionProfile(string) | Returns the path of the current interaction profile for the given user path. |
| GetCurrentInteractionProfile(ulong) | Returns the path of the current interaction profile for the given user path. |
| GetEnvironmentBlendMode() | Returns the current XR Environment Blend Mode. |
| GetViewConfigurationTypeForRenderPass(int) | Returns viewConfigurationType for the given renderPass index. |
| HookGetInstanceProcAddr(IntPtr) | Called to hook xrGetInstanceProcAddr. Returning a different function pointer allows intercepting any OpenXR method. |
| OnAppSpaceChange(ulong) | Called when the reference xrSpace for the app changes. |
| OnDisable() | |
| OnEnable() | |
| OnEnabledChange() | Called when the enabled state of a feature changes |
| OnEnvironmentBlendModeChange(XrEnvironmentBlendMode) | Notification to the feature implementer that the environment blend mode has changed. |
| OnFormFactorChange(int) | Notification to the feature implementer that the form factor has changed. |
| OnInstanceCreate(ulong) | Called after xrCreateInstance. |
| OnInstanceDestroy(ulong) | Called before xrDestroyInstance |
| OnInstanceLossPending(ulong) | Called when the OpenXR loader receives the XR_TYPE_EVENT_DATA_INSTANCE_LOSS_PENDING event from the runtime. This is a notification to the feature implementer that the instance is about to be lost. This feature should do what it needs to do to clean up in preparation for termination. |
| OnSessionBegin(ulong) | Called after xrSessionBegin. |
| OnSessionCreate(ulong) | Called after xrCreateSession. |
| OnSessionDestroy(ulong) | Called before xrDestroySession. |
| OnSessionEnd(ulong) | Called before xrEndSession. |
| OnSessionExiting(ulong) | Called when the runtime transitions to the XR_SESSION_STATE_EXITING state. |
| OnSessionLossPending(ulong) | Called when the runtime transitions to the XR_SESSION_STATE_LOSS_PENDING state. This is a notification to the feature implementer that the session is about to be lost. This feature should do what it needs to do to prepare for potential session recreation. |
| OnSessionStateChange(int, int) | Called when the OpenXR loader receives the XR_TYPE_EVENT_DATA_SESSION_STATE_CHANGED event from the runtime signaling that the XrSessionState has changed. |
| OnSubsystemCreate() | Called after the OpenXR Loader is initialized and has created its subsystems. |
| OnSubsystemDestroy() | Called before the OpenXR loader destroys its subsystems. |
| OnSubsystemStart() | Called after the OpenXR loader has started its subsystems. |
| OnSubsystemStop() | Called before the OpenXR loader stops its subsystems. |
| OnSystemChange(ulong) | Called after xrGetSystem. |
| OnViewConfigurationTypeChange(int) | Notification to the feature implementer that the view configuration type has changed. |
| PathToString(ulong) | Converts an XrPath to a string. |
| SetEnvironmentBlendMode(XrEnvironmentBlendMode) | Set the current XR Environment Blend Mode if it is supported by the active runtime. If not supported, fall back to the runtime preference. |
| StartSubsystem<T>() | Start a subsystem instance of a given type. Subsystem is assumed to already be loaded from a previous call to CreateSubsystem. Promoted to public for extensions. |
| StopSubsystem<T>() | Stops a subsystem instance of a given type. Subsystem is assumed to already be loaded from a previous call to CreateSubsystem. Promoted to public for extensions. |
| StringToPath(string) | Converts a string to an XrPath. |