Class AndroidOpenXRDisplaySubsystemExtensions
Android OpenXR extension methods for the XRDisplaySubsystem.
Important
These extension methods require that you enable the Android OpenXR 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.Android
Assembly: Unity.XR.AndroidOpenXR.dll
Syntax
public static class AndroidOpenXRDisplaySubsystemExtensions
Methods
TryGetSupportedDisplayRefreshRates(XRDisplaySubsystem, Allocator, out NativeArray<float>)
Attempts to get the supported display refresh rates for the device.
Declaration
public static XRResultStatus 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 |
---|---|
XRResultStatus | true if |
Remarks
Important
This extension method requires that you enable the Android OpenXR 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
TrySetDisplayRefreshRate(XRDisplaySubsystem, float)
Attempts to request a change to the current display refresh rate. If the request is successfully created, Android OpenXR's runtime is expected to change the display refresh rate on a subsequent frame.
Declaration
public static XRResultStatus TrySetDisplayRefreshRate(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 |
---|---|
XRResultStatus | true if the request was successfully created. Otherwise, false. |
Remarks
Important
This extension method requires that you enable the Android OpenXR 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.