backButtonLeavesApp
Whether the Back button hands control to the operating system instead of the application.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Property
- Namespace: UnityEngine
- Assembly: UnityEngine.InputLegacyModule
public static bool backButtonLeavesApp { get; set; }
Remarks
Note: This property has moved to _backButtonLeavesApp, because it controls application lifecycle rather than input. Use ; reads and writes the same underlying flag and will be removed.
Application.backButtonLeavesAppInput.backButtonLeavesAppOnly usable on Android or Universal Windows Platform (UWP). On all other platforms the property is a no-op: the getter always returns false and the setter has no effect.
The default value is false.
When the value is true, the operating system handles Back: it minimizes the application on Android and suspends it on UWP. Otherwise, the button is delivered to the application as the Escape key, which you can read by calling Input.GetKey and passing KeyCode.Escape.