Forum Discussion

🚨 This forum is archived and read-only. To submit a forum post, please visit our new Developer Forum. 🚨

2 Replies

Replies have been turned off for this discussion
  • dharmik.6058​ Hi, How is it going?

    Recommending you attach a script like below. I'm not sure if you are doing this already.
    This will lock your FPS to 90. Incase if you do this already and you dont get 90, try reducing it to 72 FPS. 

    You can tweak the value of

     targetFrameRate 

    parameter in this code.

    using UnityEngine;
    #if UNITY_ANDROID && !UNITY_EDITOR
    using Unity.XR.Oculus;
    #endif
    
    public class MetaQuestFrameRateSetter : MonoBehaviour
    {
        [SerializeField] private int targetFrameRate = 90;
    
        void Start()
        {
            // Lock Unity's Application frame rate
            Application.targetFrameRate = targetFrameRate;
    
            // Optional: Match vsync count
            QualitySettings.vSyncCount = 0; // Disable vsync, since we are manually setting FPS
    
    #if UNITY_ANDROID && !UNITY_EDITOR
            // Attempt to set preferred refresh rate (for Meta Quest)
            try
            {
                OVRManager.display.displayFrequency = targetFrameRate;
                Debug.Log($"[MetaQuest] Target refresh rate set to {targetFrameRate}Hz");
            }
            catch
            {
                Debug.LogWarning("[MetaQuest] Failed to set refresh rate. Ensure OVRManager is initialized and the device supports it.");
            }
    #endif
        }
    }

     

    Let me know if this works. 

  • If you still dont get a good framerate, please share your profiler and memory profiler data with me, will try to figure the best optimization possible.