Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


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
Warning
Deprecated. Input.backButtonLeavesApp is deprecated and will be removed in a future release. Use Application.backButtonLeavesApp instead.
public static bool backButtonLeavesApp { get; set; }

Remarks

Note: This property has moved to _backButtonLeavesApp, because it controls application lifecycle rather than input. Use
Application.backButtonLeavesApp
;
Input.backButtonLeavesApp
reads and writes the same underlying flag and will be removed.
Only 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.