Exit application with backbutton does not work

Hi,

In my terrain object i have the following java script:

function Update () {
    if(Input.GetKeyDown(KeyCode.Escape)){
                Application.Quit();
            }
}

the only thing i want in my application is that it will shut down when i press the back button on my device. But it does not work. What am i doing wrong?

This works perfectly for me, I can’t see any reason why this would fail. I’ve tested it on a number of Android devices.

Try GetKeyUp instead.

Alternatively, try to put your code in LateUpdate() instead of Update().