Remix.run Logo
edflsafoiewq 2 days ago

I understand why coroutines are an issue for saving, but why are they an issue for pausing? Don't you just not resume the coroutines while paused?

glenneroo 2 days ago | parent [-]

It depends. If you are using `yield return new WaitForSecondsRealtime(x)` then the coroutine keeps running when you set TimeScale to 0, but that's usually a feature and not a bug, since it lets you potentially use them when paused (since async/task C# stuff was usually been a bit sketchy, though it's definitely better now).

Some more info here (and in general about pausing in Unity): https://gamedevbeginner.com/the-right-way-to-pause-the-game-...