- Home /
Time.unscaledDeltaTime behavior different on Android and iOS, when app backgrounded.
I have a timer running inside a Coroutine that uses Time.unscaledDeltaTime. When I background the app the coroutine is paused. But Time.unscaledDeltaTime is still counting in the background on Android. When I foreground the app after a long time, the timer coroutine starts running again and timer is already elapsed on Android. On iOS, it picks up from where it left off, indicating that Time.unscaledDeltaTime was not counting in the background. Has anyone experienced this? Also this just started happening on Android, it used to work before. Below are 2 screenshots that showcase the behavior on Android and iOS.
Timer on Android
Timer on iOS
As you can notice, on Android after coroutine is unpaused timer is already elapsed. But on iOS it resumes from where it left off. This seems really weird, to have different behaviors on different platforms.