- Home /
How to pause game when receiving phone call on Android 6?
Note, on Android 6 calls are like a notification, so OnApplicationPause()
doesn't work here.
Comment
Answer by SohailBukhari · Jun 21, 2017 at 08:24 AM
In your player settings, make sure that "run in background" is not set.
Unity will call OnApplicationPause() on all of your MonoBehaviours when the player is paused (for example, by receiving a phone call). You could use this to bring up a pause menu.
Answer by vtunity · Jun 21, 2017 at 08:28 AM
Unity will call OnApplicationPause() on all of your MonoBehaviours when the player is paused (for example, by receiving a phone call). You could use this to bring up a pause menu.