Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice

Can't reduce frame rate when targeting OpenVR or Windows Mixed Reality

Discussion in 'AR/VR (XR) Discussion' started by cb_m, Jul 2, 2020.

  1. cb_m


    Aug 3, 2019
    Hi everyone,

    I'm using Unity 2019.2.21 and I'm trying to reduce the frame rate for my application to 10, 20, 30, 45 FPS. When I am set on PC/MAC/Linux standalone in the Build Settings, I'm setting the following parameters in a Start() call and when I run my application in the Unity editor everything works fine and the framerate is the target frame rate I have set in code:
    QualitySettings.vSyncCount = 0;
    Application.targetFrameRate = <desired frame rate>;

    As soon as I enable XR support (either OpenVR or Windows Mixed Reality, as I have two different headsets to test with: one that's supported by SteamVR and one that's WinMR), those settings are not respected anymore and it runs at 90fps as that's the SteamVR setting (90 Hz), or 60/90fps depending on the Windows Mixed Reality setting (60 or 90 Hz). I've tried just using just the vSyncCount option (I've tested both in Start() call and Update() call) and setting it to 2 or 3 to halve or reduce the framerate to a third, but with no luck at all. The script where the vSyncCount setting is set is not attached to the camera, but to another gameobject. Any ideas how I can reduce the framerate when targeting OpenVR or WinMR?

    Thanks for your help!