The Android XR SDK is now available in Developer Preview. We want your feedback! Visit our
support page to reach out.
Stay organized with collections
Save and categorize content based on your preferences.
XRDisplayRefreshRateFeature
This OpenXRInteractionFeature provides access to the XR_FB_display_refresh_rate extension.
Summary
Inheritance
Inherits from:
OpenXRFeature
Public attributes
|
ExtensionString = "XR_FB_display_refresh_rate"
|
const string
The OpenXR Extension string.
|
FeatureId = "com.google.xr.extensions.display_refresh_rate"
|
const string
The feature ID string.
|
UiName = "Display Refresh Rate"
|
const string
The UI name shows on the XR Plug-in Management panel, to help users understand validation errors and expected fixes.
|
Public static attributes
|
IsExtensionEnabled => _extensionEnabled
|
bool
Gets if the required OpenXR extension is enabled.
|
Public attributes
ExtensionString
const string ExtensionString = "XR_FB_display_refresh_rate"
The OpenXR Extension string.
Used to check if this extension is available or enabled.
FeatureId
const string FeatureId = "com.google.xr.extensions.display_refresh_rate"
UiName
const string UiName = "Display Refresh Rate"
The UI name shows on the XR Plug-in Management panel, to help users understand validation errors and expected fixes.
Public static attributes
IsExtensionEnabled
bool IsExtensionEnabled => _extensionEnabled
Gets if the required OpenXR extension is enabled.
When OpenXR runtime is waiting, it returns null
. Otherwise, it indicates whether the XR_FB_display_refresh_rate extension is available on the current device.
Public static functions
GetDisplayRefreshRateInfo
bool GetDisplayRefreshRateInfo(
out XRDisplayRefreshRateInfo info
)
Gets the refresh rates supported by the device and the device's current refresh rate.
Details |
Parameters |
info
|
Refresh rate info obtained from the system.
|
|
RequestDisplayRefreshRate
void RequestDisplayRefreshRate(
float displayRefreshRate
)
Request the system to dynamically change the display refresh rate.
Note that this is only a request and does not guarantee the system will switch to the requested display refresh rate.
Details |
Parameters |
displayRefreshRate
|
The value must be 0.0f or one of the supported refresh rates returned by GetDisplayRefreshRateInfo. A value 0.0f indicates the application has no preference.
|
|
Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
Last updated 2024-12-12 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-12-12 UTC."],[],[],null,["# XRDisplayRefreshRateFeature Class Reference\n\nXRDisplayRefreshRateFeature\n===========================\n\nThis OpenXRInteractionFeature provides access to the XR_FB_display_refresh_rate extension.\n\nSummary\n-------\n\n### Inheritance\n\nInherits from: `OpenXRFeature`\n\n| ### Public attributes ||\n|-----------------------------------------------------------------------------|-------------------------------------------------------------------------------------------------------------------------------------|\n| [ExtensionString](#extensionstring)` = \"XR_FB_display_refresh_rate\"` | `const string` The OpenXR Extension string. |\n| [FeatureId](#featureid)` = \"com.google.xr.extensions.display_refresh_rate\"` | `const string` The feature ID string. |\n| [UiName](#uiname)` = \"Display Refresh Rate\"` | `const string` The UI name shows on the XR Plug-in Management panel, to help users understand validation errors and expected fixes. |\n\n| ### Public static attributes ||\n|------------------------------------------------------------------|----------------------------------------------------------|\n| [IsExtensionEnabled](#isextensionenabled)` =\u003e _extensionEnabled` | `bool` Gets if the required OpenXR extension is enabled. |\n\n| ### Public static functions ||\n|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------------------------------------------------------------------------------------------|\n| [GetDisplayRefreshRateInfo](#getdisplayrefreshrateinfo)`(out `[XRDisplayRefreshRateInfo](/develop/xr/unity/reference/struct/Google/XR/Extensions/XRDisplayRefreshRateInfo#structGoogle_1_1XR_1_1Extensions_1_1XRDisplayRefreshRateInfo)` info)` | `bool` Gets the refresh rates supported by the device and the device's current refresh rate. |\n| [RequestDisplayRefreshRate](#requestdisplayrefreshrate)`(float displayRefreshRate)` | `void` Request the system to dynamically change the display refresh rate. |\n\nPublic attributes\n-----------------\n\n### ExtensionString\n\n```c#\nconst string ExtensionString = \"XR_FB_display_refresh_rate\"\n``` \nThe OpenXR Extension string.\n\nUsed to check if this extension is available or enabled. \n\n### FeatureId\n\n```c#\nconst string FeatureId = \"com.google.xr.extensions.display_refresh_rate\"\n``` \nThe feature ID string. \n\n### UiName\n\n```c#\nconst string UiName = \"Display Refresh Rate\"\n``` \nThe UI name shows on the XR Plug-in Management panel, to help users understand validation errors and expected fixes.\n\nPublic static attributes\n------------------------\n\n### IsExtensionEnabled\n\n```c#\nbool IsExtensionEnabled =\u003e _extensionEnabled\n``` \nGets if the required OpenXR extension is enabled.\n\nWhen OpenXR runtime is waiting, it returns `null`. Otherwise, it indicates whether the XR_FB_display_refresh_rate extension is available on the current device.\n\nPublic static functions\n-----------------------\n\n### GetDisplayRefreshRateInfo\n\n```c#\nbool GetDisplayRefreshRateInfo(\n out XRDisplayRefreshRateInfo info\n)\n``` \nGets the refresh rates supported by the device and the device's current refresh rate.\n\n\n| Details ||\n|------------|-------------------------------------------------------------------------------------------------------------------|\n| Parameters | |--------|---------------------------------------------| | `info` | Refresh rate info obtained from the system. | |\n\n### RequestDisplayRefreshRate\n\n```c#\nvoid RequestDisplayRefreshRate(\n float displayRefreshRate\n)\n``` \nRequest the system to dynamically change the display refresh rate.\n\nNote that this is only a request and does not guarantee the system will switch to the requested display refresh rate.\n\n\n| Details ||\n|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Parameters | |----------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------| | `displayRefreshRate` | The value must be 0.0f or one of the supported refresh rates returned by GetDisplayRefreshRateInfo. A value 0.0f indicates the application has no preference. | |"]]