Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨
johanneslundber's avatar
johanneslundber
Honored Guest
7 years ago

Rendering in 72 FPS on Oculus Go

What's the recommended way to get Unity rendering in 72 FPS for the Oculus Go?

The Oculus Unity Developer Guide only mentions either 60 FPS for Mobile or 90 FPS for the Rift and AFAIK doesn't describe how to actually to achieve this in Unity.

3 Replies

Replies have been turned off for this discussion
  • Heaney-555's avatar
    Heaney-555
    Heroic Explorer
    Create a new script.

    Have this public instance variable in it:
    public OVRManager OVRManager;
    Put this in the Awake() or Start():
    StartCoroutine(SetFrequency());
    Then create this method somewhere in the class:
    IEnumerator SetFrequency()
    {
    yield return new WaitUntil(() => OVRManager.display.displayFrequenciesAvailable.Length > 0);

    float displayFreq = OVRManager.display.displayFrequency;
    foreach (float freq in OVRManager.display.displayFrequenciesAvailable)
    {
    if (freq > displayFreq) {
    displayFreq = freq;
    }
    }
    OVRManager.display.displayFrequency = displayFreq;
    }
    Now add this script into your first scene (drag it onto an empty object or whatever), and assign the OVRManager script instance from the OVRCameraRig object in your scene onto the public OVRManager variable on the script you made.

    If your first scene is a special loading scene, use this in the loading script, and use a boolean to make sure that this has been done before you load in the first real non-loading scene.

    This is a forwards-compatible script meaning that your app will run at the maximum refresh rate of whatever decice it's running on, so even in years from now if people try to run it on a 120Hz Oculus Go 3 (for example), it'll run at 120Hz there.
  • Thank you very much for the clear answer.. including your forward-compatible lines of code. Really appreciated!