Class DisplayUtilitiesFeature
Use this OpenXR feature to enable OpenXR extensions associated with the MetaOpenXRDisplaySubsystemExtensions. Without the necessary OpenXR extensions enabled, the display subsystem extension methods will always return false.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Meta
Assembly: Unity.XR.MetaOpenXR.dll
Syntax
[OpenXRFeature(UiName = "Meta Quest: Display Utilities", BuildTargetGroups = new BuildTargetGroup[] { BuildTargetGroup.Android, BuildTargetGroup.Standalone }, Company = "Unity Technologies", Desc = "Enables you to request a specific display refresh rate", DocumentationLink = "https://docs.unity3d.com/Packages/com.unity.xr.meta-openxr@1.0/manual/features/display-utilities.html", OpenxrExtensionStrings = "XR_FB_display_refresh_rate", Category = "Feature", FeatureId = "com.unity.openxr.feature.meta-display-utilities", Version = "0.1.0")]
public class DisplayUtilitiesFeature : OpenXRFeature
Fields
displayName
UI display name of this feature.
Declaration
public const string displayName = "Meta Quest: Display Utilities"
Field Value
| Type | Description |
|---|---|
| string |
featureId
The feature id string. This is used to give the feature a well known id for reference.
Declaration
public const string featureId = "com.unity.openxr.feature.meta-display-utilities"
Field Value
| Type | Description |
|---|---|
| string |
Methods
HookGetInstanceProcAddr(IntPtr)
Called to hook xrGetInstanceProcAddr. Returning a different function pointer allows intercepting any OpenXR method.
Declaration
protected override IntPtr HookGetInstanceProcAddr(IntPtr func)
Parameters
| Type | Name | Description |
|---|---|---|
| IntPtr | func | xrGetInstanceProcAddr native function pointer |
Returns
| Type | Description |
|---|---|
| IntPtr | Function pointer that Unity will use to look up OpenXR native functions. |
Overrides
OnAppSpaceChange(ulong)
Called when the reference xrSpace for the app changes.
Declaration
protected override void OnAppSpaceChange(ulong xrSpace)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrSpace | Handle of the xrSpace |
Overrides
OnInstanceCreate(ulong)
Called after xrCreateInstance.
Declaration
protected override bool OnInstanceCreate(ulong xrInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrInstance | Handle of the xrInstance |
Returns
| Type | Description |
|---|---|
| bool | Returns |
Overrides
OnInstanceDestroy(ulong)
Called before xrDestroyInstance.
Declaration
protected override void OnInstanceDestroy(ulong xrInstance)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrInstance | Handle of the xrInstance |
Overrides
OnSessionCreate(ulong)
Called after xrCreateSession.
Declaration
protected override void OnSessionCreate(ulong xrSession)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrSession | Handle of the xrSession |
Overrides
OnSessionDestroy(ulong)
Called before xrDestroySession.
Declaration
protected override void OnSessionDestroy(ulong xrSession)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrSession | Handle of the xrSession |
Overrides
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.
Declaration
protected override void OnSessionStateChange(int oldState, int newState)
Parameters
| Type | Name | Description |
|---|---|---|
| int | oldState | Previous state |
| int | newState | New state |
Overrides
OnSystemChange(ulong)
Called after xrGetSystem.
Declaration
protected override void OnSystemChange(ulong xrSystem)
Parameters
| Type | Name | Description |
|---|---|---|
| ulong | xrSystem | Handle of the xrSystemId |