Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    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:
    454
    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:
    5,136
    Check OVRMetrics, probably GPU is at 100%
     
  3. NewMagic-Studio

    NewMagic-Studio

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

    NewMagic-Studio

    Joined:
    Feb 25, 2015
    Posts:
    454
    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:
    23
    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:
    454
    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:
    5,136
    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:
    454
    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:
    454
    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:
    454
    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:
    5,136
    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:
    454
    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:
    454
    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:
    5,136
    I'd say check the frame debugger and GPU profiler to see where gpu performance goes