Hi!
I am using android platform.
I have problem when I pause game (Time.timescale = 0f) and keep pause for 4-5minutes and remove the pause from the game with Time.timescale = 1f, I start to get huge fps drop ( from 60 to 10 ).
This is not reproducible when pausing game for short time.
I think this might be because of the Heavy Load on fixedupdate , but I am not sure.
Is there a way to clear the load in a clean way? Or some other solution if someone has ran out to same problem.
Nobody is going to be able to tell you what’s going on in your project that only you have access to.
The only way to debug this and any other performance issue is to use the Profiler.
I have a suspicion that you do things outside the game loop, such as event handling, that add to processing time. When the game runs, this is hidden within each frame’s computation time and doesn’t affect the fps. But when you pause for a longer time, this might be filling some kind of buffer or creating garbage that will then have to be processed/collected when the game is unpaused. Just a hunch.
Why do you suspect heavy load in FixedUpdate? I mean you paused the game, right, so it will just continue where it left off when you unpause - unless you do run code that’s not affected by timescale (see above).