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’re making changes to the Unity Runtime Fee pricing policy that we announced on September 12th. Access our latest thread for more information!
    Dismiss Notice
  3. Dismiss Notice

Question Half fps in build

Discussion in 'VR' started by NewMagic-Studio, May 17, 2023.

  1. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    Hello, i get around 70fps in editor and around 35fps in build, i ran the profiler and i get this, which doesn't clarify me anything about why in editor has double fps

    upload_2023-5-17_10-24-45.png
     
  2. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,226
    Check OVRMetrics, probably GPU is at 100%
     
  3. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    But anyways why in editor doubles fps then?
     
  4. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    In Editor profiler shows me this, instead PostLateUpdate make it lags it is FrameEvents.XRBeginFrame and RenderingPipelineManager.DoRender, but requiring much less ms

    upload_2023-5-17_11-48-52.png
     
  5. Halfspacer

    Halfspacer

    Joined:
    Sep 13, 2014
    Posts:
    22
    I'm assuming the 72 ish fps you see in Editor is because that's your actual target rate. On device, when you miss that target, your frame rate is capped at 36 (half) which makes sense from an interpolation/extrapolation point of view.
     
  6. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    I cannot set a target frame rate with VR, it picks the VR SDK picks it, and anyways why makes sense that frame rate is capped at half in build? don't understand what you mean bout interpolation/extrapolation, and how could i solve this? It should miss the target in editor or in build, what is the difference?
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,226
    A PC is faster than a android device/quest.
    If you test in editor, you are running the game on PCVR, not on the quest natively.
    Vsync will set the fps to a value which is a halve of the full fps(72), which is 36, hence that FPS.
    In order to fix it, you need to optimize the performance of your game
     
  8. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    So i need to set my fps always higher than the hz the device has? or fps will be halved?
     
  9. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    I see i get fps around 71.8, is like 72hz which is what oculus quest 2 hz has, i tried to remove all geometry and gives me the same fps, so if in editor i have the required 72 fps why in build halves fps?
     
  10. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    I am using quest link, i am not running just on quest, i am using PC resources
     
  11. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,226
    If performance cannot be achieved it will halve.

    Ah, I thought you were in standalone android builds. If it happens on windows build, make sure oculus app, unity, oculus xr plugin, xr management, and (if used) oculus integration are all updated.

    And make sure you use the same quality tier in-editor as in builds
     
  12. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    I don't use oculus XR and oculus integration, i use open XR, i use quest 2 but i want to be compatible with other devices too. Yes, i set the quality level in script to make sure i use the same quality level, but still build has half fps
    I use Unity 2021.3 LTS, i cannot update it. XR plugin management is updated
     
  13. NewMagic-Studio

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    432
    Sometimes i get around 72 fps in build at start but always end falling to half fps after some seconds, don't know why drops and why sometimes starts in 72fps and other times not
     
  14. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,226
    I'd say check the frame debugger and GPU profiler to see where gpu performance goes