I have a simple game object (the main UI object) with OnApplicationPause
that prints out the Pause
status (true/false)
in the debug log.
When I run
it on android, and press the Home Button
to leave the app, I see that the OnApplicationPause()
is called twice
in a row, with the same pauseStatus
(true). The same happens when I reopen the app: the OnApplicationPause
is called twice with Pause
status false.
Why is it being called twice and can I avoid it? Am I doing anything wrong?
I also tried to create a separate GameObject, that includes the same debug code. The issue doesn't occur there - only in my main UI object.