How Back Button Works in Unity

 

You have to know that it does not check in Editor you have to check in android device

   1: if (Input.GetKeyDown(KeyCode.Escape))
   2:        {
   3:            Debug.Log("Escape Pressed");
   4:            Application.Quit();
   5:        }

Comments