I have found this problem in our current project, and I haven’t found a way to fix it, or overcome it. And we are not sure if it’s a bug or not.
We are using Unity 5.3.4f1.
So the problem is: our game is a 2D side-scroller with physics (so we are using Physics2D), what we found is that when pausing the game (that is, setting Time.TimeScale to 0), nothing goes wrong. But when restoring the timescale to the default value to unpause the game, we get a really long timestep on the first FixedUpdate (the longer we wait to unpause the game the longer the timestep is). This happens only on scenes with a fair quantity of dynamic rigidbodies and can halt the game for a pretty long time. This is pretty weird as the timestep is supposed to be constant.
So searching around the forums we saw that we needed to also decrease the Time.FixedDeltaTime, so we tried. But the problem after that is that when pausing there are thousands of calls to FixedUpdate and Physics, which is normal when you reduce the FixedDeltaTime so much, and the physics can go really crazy if the stars get alligned. But the thing is, when you set the TimeScale to 0 technically there shouldn’t be any call to FixedUpdate.
So I need help to understand really what’s going on in the main loop, I don’t know if there’s something we are not having in mind, or if it’s a version bug.
Thanks in advance!