- Home /
Question by
noodlesdev · Jun 12, 2018 at 10:26 PM ·
androidiosmobileeventonapplicationpause
What event gets called on resuming a game on mobile?
So for my mobile game you can unlock a few players by being redirected to any of my social media accounts. I do this with a simple Application.OpenURL(). Thing is, I want to unlock the player after the player went into the browser (IOW when the player moves out of the game window).
But what event gets called when they go into the browser? OnApplicationPause ? and what gets called when they return from it?
Comment
Answer by SlowCircuit · Jun 13, 2018 at 12:48 AM
OnApplicationPause() returns both true and false.
https://docs.unity3d.com/ScriptReference/MonoBehaviour.OnApplicationPause.html
void OnApplicationPause(bool pauseStatus) { isPaused = pauseStatus; }