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. Dismiss Notice

Question Quest 2 optimization tips?

Discussion in 'VR' started by aCake0202, Jun 15, 2021.

  1. aCake0202

    aCake0202

    Joined:
    Mar 11, 2021
    Posts:
    26
    We're developing a VR game. On PC, it runs decently. It's easy to hit 80+ FPS which is more than enough. There are still some slow downs, but we are having a hard time pinning them down and they are rare once the game is built.

    We're in the process of porting the game to Quest 2. It runs on the device, but just barely. Some areas give a decent 50ish FPS, but starting certain levels and at seemingly random times, the game will bog down extremely. We have tried
    -Turning off shadows
    -Mobile shaders
    -Removing particles
    -GPU Instancing
    -Static Batching
    -Forcing texture size to be lower
    -Downsizing maps so less is on screen
    -Occlusion

    But we have had little-to-no boost in performance. If anyone has any tips, or could possibly give us a hand in optimizing our game we would greatly appreciate it!
     
  2. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
  3. aCake0202

    aCake0202

    Joined:
    Mar 11, 2021
    Posts:
    26
  4. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    You will want to ignore editorloop, and attach the profiler the device, so you are profiling on Quest 2 and not your desktop machine - obviously building an APK in debug mode for it. See player settings.

    I note that garbage is being allocated in the playerloop. You could switch to hierarchical view and then sort by millisecs column to see the biggest slowdowns at the top of a tree view.

    But generally you want to be allocating 0 garbage per frame on Quest 2. But first you need to learn how to use the profiler. Once you do it will tell you precisely where the slower parts are.

    If you want you can try optimising it on the desktop. The places where it's slower will teach you how to do all this before lengthy APK builds.
     
  5. hippocoder

    hippocoder

    Digital Ape Moderator

    Joined:
    Apr 11, 2010
    Posts:
    29,723
    Have you tried without post effects and HDR? These are pretty much a no-go on Quest2 unless Unity codes some Vulkan specific optimisations.
     
  6. aCake0202

    aCake0202

    Joined:
    Mar 11, 2021
    Posts:
    26
    We have. We are currently trying to learn the profiler, but we are very confused about it. Although we will figure it out with time.
     
  7. DevDunk

    DevDunk

    Joined:
    Feb 13, 2020
    Posts:
    4,402
    Try Oculus OVR Metrics Tool to see what is the bottleneck in the switch itself.
    Using multiview rendering instead of dual pass, using IL2CPP and more can already help quite some. Other than that it's seeing where the issue lies and trying to understand what is happening.

    If it's GPU limited try the frame debugger as well to see where the draw calls go
     
  8. kenamis

    kenamis

    Joined:
    Feb 5, 2015
    Posts:
    386
    DevDunk likes this.