- Home /
OnApplicaitonFocus(false) called only after game returns to foreground
On Android, we noticed that, when the game goes to background on Android, we receive the OnApplicationPause(true) call, as expected. However, the accompanying OnApplicationFocus(false) is only called after the game returns to foreground (immediately followed by OnApplicationFocus(true)). Any insights?
I usually use OnApplicationPause and check for true or false in that, which works fine for me... why do u want to use onApplicationFocus any specific reasons?
OnApplicationPause does nearly the same.
That's a good point, and we're considering doing that. But, presumably, if Application.runInBackground is true, then the focus event will fire, but the pause will not? (EDIT: to answer my own question, no, runInBackground seems to have no effect in my tests.)