When the Home button is pressed on an iOS
device, the application will either end or suspend. Which event occurs, depends on
a Player Settings
item in the Other
Settings
section, which is aptly titled Exit on
Suspend
, as shown in the following screenshot:
Note
On iOS devices that do not support multitasking, the application will always exit when the Home button is pressed.
As game developers, we may need to decide if we want our game to end or suspend.
There is a better alternative, which is to let the game player decide if the game should end or suspend when the Home button is pressed.
If we choose to let the player decide, then we need to set the Boolean
variable PlayerSettings.iOS.exitOnSuspend
based on the
player's selection from a preference dialog.
However,...