Search Unity

WaitForTargetFPS occurs when vsync is disabled.

Discussion in 'Android' started by MUGIK, Jan 11, 2019.

  1. MUGIK

    MUGIK

    Joined:
    Jul 2, 2015
    Posts:
    481
    Today I faced problem with my android game. I had 27 FPS on device. With Profiler I was able to locate problem. It was WaitForTargetFPS. As always, I just disable vsync on every quality setting, because this works for me all the time. But now this didn't help, so I started to check my shaders, GC, multithreaded rendering... After several hours of ****, I decided to try to enable vsync. And this helped!

    I didn't find anything similar to my situation on the internet, that's why I writing this post.
    Unity 2018.3.0f2

    Also, now almost 50% of load consumed by Present.BlitToCurrentFB, and I can't find anything about that on forums.
    upload_2019-1-11_19-2-0.png
    But, I have 55 fps on device. My device screen support 55 fps max, so... I think that Device.Present represents vsync.

    UPD:
    Device.Present happens when Multithreaded Rendering disabled. If enabled, then Gfx.WaitForPresent appears.
     
    Last edited: Jan 11, 2019
  2. Black_Raptor

    Black_Raptor

    Joined:
    Nov 3, 2014
    Posts:
    181
    I have exactly the same problem on 2018.3.12f
     
  3. brkbkc

    brkbkc

    Joined:
    Jan 28, 2019
    Posts:
    36
    This is an old post but i have same problem now.
     
  4. tcz8

    tcz8

    Joined:
    Aug 20, 2015
    Posts:
    504
    Same here on 2019.4.34 I wonder if cinemachine or something in the post processing stack could be the cause...