docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TryGetSupportedDisplayRefreshRates

    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 refreshRates out parameter.

    NativeArray<float> refreshRates

    A NativeArray containing all supported display refresh rates. You are responsible to Dispose this if you pass Persistent as your allocator strategy.

    Returns
    Type Description
    bool

    true if refreshRates was successfully written. Otherwise, false.

    Remarks
    Important

    This extension method requires that you enable the Meta 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.

    In This Article
    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023