Class MetaOpenXRDisplaySubsystemExtensions
OpenXR Meta extension methods for the XRDisplaySubsystem.
Important
These extension methods require that you enable the Meta Quest Display Utilities feature in Project Settings > XR Plug-in Management > OpenXR. If the display utilities feature is not enabled, all extension methods will return false.
Inherited Members
Namespace: UnityEngine.XR.OpenXR.Features.Meta
Assembly: Unity.XR.MetaOpenXR.dll
Syntax
public static class MetaOpenXRDisplaySubsystemExtensionsMethods
TryGetSupportedDisplayRefreshRates(XRDisplaySubsystem, Allocator, out NativeArray<float>)
Attempts to get the supported display refresh rates for the device.
Declaration
public static bool TryGetSupportedDisplayRefreshRates(this XRDisplaySubsystem subsystem, Allocator allocator, out NativeArray<float> refreshRates)Parameters
| Type | Name | Description | 
|---|---|---|
| XRDisplaySubsystem | subsystem | The subsystem instance used by this extension method. | 
| Allocator | allocator | The allocator strategy to use for the  | 
| NativeArray<float> | refreshRates | A  | 
Returns
| Type | Description | 
|---|---|
| bool | true if  | 
Remarks
Important
This extension method requires that you enable the Meta Quest Display Utilities feature in Project Settings > XR Plug-in Management > OpenXR. If the display utilities feature is not enabled, this method will always return false.
See Also
TryRequestDisplayRefreshRate(XRDisplaySubsystem, float)
Attempts to request a change to the current display refresh rate. If the request is successfully created, Meta's OpenXR runtime is expected to change the display refresh rate on a subsequent frame.
Declaration
public static bool TryRequestDisplayRefreshRate(this XRDisplaySubsystem subsystem, float refreshRate)Parameters
| Type | Name | Description | 
|---|---|---|
| XRDisplaySubsystem | subsystem | The subsystem instance used by this extension method. | 
| float | refreshRate | The requested refresh rate. Must be an element of the array output from TryGetSupportedDisplayRefreshRates. | 
Returns
| Type | Description | 
|---|---|
| bool | true if the request was successfully created. Otherwise, false. | 
Remarks
Important
This extension method requires that you enable the Meta Quest Display Utilities feature in Project Settings > XR Plug-in Management > OpenXR. If the display utilities feature is not enabled, this method will always return false.