Search Unity

temporary FPS drop when game runs, then goes to normal.

Discussion in 'Editor & General Support' started by DavidBVal, Nov 5, 2019.

  1. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    206
    This problem has started happening in the last weeks of development. When I Play in editor, but also when I run my build, my FPS gets halved for a while. This happens with a lot of randomness: it may happen for a couple seconds, or for half a minute, before my FPS raise again to normal levels.

    In profiler, it looks like rendering spikes. In the images below you can see the spikes until they end and performance becomes stable:





    I thought it might be something external, maybe my system performing another task, but on the contrary, CPU usage is on 25% or so during the slowdown, then when FPS raises to normal, it gets to 50%.

    I have little profiler experience; I'd be grateful for any advice at this point.
     
  2. DavidBVal

    DavidBVal

    Joined:
    Mar 13, 2017
    Posts:
    206
    I'd like to add more information. I am not sure what can be causing the problem, but when I run my build, the framerate drop goes away when I switch windows to another task, then switch back to the game.

    Nobody has a clue on what can be wrong? I tried to disable things in my project, but couldn't single out the cause, nor the unpredictable behavior makes it easy to find.
     
  3. TreyK-47

    TreyK-47

    Unity Technologies

    Joined:
    Oct 22, 2019
    Posts:
    1,821
  4. ArachnidAnimal

    ArachnidAnimal

    Joined:
    Mar 3, 2015
    Posts:
    1,825
    Are they reflection probes that are baking on Awake?