Using RefreshRate in Your App
On platforms which support dynamically adjusting the display refresh rate, application developers may request a specific display refresh rate in order to improve the overall user experience, examples include:
-
A video application may choose a display refresh rate which better matches the video content playback rate in order to achieve smoother video frames.
-
An application which can support a higher frame rate may choose to render at the higher rate to improve the overall perceptual quality, for example, lower latency and less flicker.
This extension allows:
-
An application to identify what display refrhttps://dl.vive.com/SDK/openxr/unity/xrpluginmaesh rates the session supports and the current display refresh rate.
-
An application to request a display refresh rate to indicate its preference to the runtime.
Step 1. Check your VIVE OpenXR Plugin version

In Window > Package Manager, make sure your VIVE OpenXR Plugin 2.0.0 or newer.
Step 2. Enable the RefreshRate feature
In Edit > Project Settings > XR Plug-in Management > OpenXR, enable the XR FB Display Refresh Rate feature.

Step 3. Create a script and attach it onto any GameObject in the scene.
In the script, first add a using namespace.
using VIVE.OpenXR;
1) To Get current Refresh Rate:
{
float value;
if (XR_FB_display_refresh_rate.GetDisplayRefreshRate(out value) == XrResult.XR_SUCCESS)
{
Debug.Log("GetDisplayRefreshRate = " + value);
}
}
2) To Request a specific Refresh Rate:
{
XR_FB_display_refresh_rate.RequestDisplayRefreshRate(90.0f);
}
3) Check the capacity of the display Refresh Rates of the Device:
{
UInt32 count;
float[] values = new float[2];
XrResult result = XR_FB_display_refresh_rate.EnumerateDisplayRefreshRates(displayRefreshRateCapacityInput : 0, displayRefreshRateCountOutput:out count, displayRefreshRates: out values[0]);
if (result == XrResult.XR_SUCCESS)
{
Debug.Log("EnumerateDisplayRefreshRates = " + count);
Array.Resize(ref values, (int)count);
result = XR_FB_display_refresh_rate.EnumerateDisplayRefreshRates(displayRefreshRateCapacityInput: count, displayRefreshRateCountOutput: out count, displayRefreshRates: out values[0]);
if (result == XrResult.XR_SUCCESS)
{
for (int i = 0; i < count; i++)
{
Debug.Log("EnumerateDisplayRefreshRates index " + i + " RefreshRates = " + values[i]);
}
}
}
}