timeScale = 0 interferes with Invoke()

I’m using Time.timeScale = 0 to pause my game, but I’ve noticed that this interferes with the proper timing of previously pending Invoke() and InvokeRepeating() calls. Is there a known work-around for this?

Issues of what kind?

For example, I have an InvokeRepeating() set to spawn enemies at a rate of 1 per second. If I pause the game and then resume after a couple of seconds, shortly thereafter I’ll actually get two enemies spawning at the same time each second instead of just the one. I also have enemies who drop a bomb at a certain time, and that sometimes gets offset. Its like the remaining portion of the Invoke() doesn’t get accurately “saved” before the pause.

Maybe you have “yield WaitForSeconds()” in that remaning portion of the function you invoke? In that case it would “stop” until Time.timeScale goes back to something more than 0.

No, I’m not using yield anywhere.