docs.unity.cn
Search Results for

    Show / Hide Table of Contents

    Method TryRequestDisplayRefreshRate

    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 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
    TryGetDisplayRefreshRate(out float)
    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