i want to quit my game by pressing escape and not taskmanager.
i found this:
// Quits the player when the user hits escape function
Update () { if (Input.GetKey (“escape”))
{ Application.Quit(); } }
but it dosen’t work, help!
i want to quit my game by pressing escape and not taskmanager.
i found this:
// Quits the player when the user hits escape function
Update () { if (Input.GetKey (“escape”))
{ Application.Quit(); } }
but it dosen’t work, help!
It works in build application
it does not work in editor
i did build it, but it still dosen’t work.
Update ()
{
if (Input.GetKey(KeyCode.Escape))
{
Application.Quit();
}
}
copy this
okay i fixed it, i forgot to add it to the game… that makes feel stupid lol
hahahahahha its true, stupid mistakes are most of the time, the reason. nothing to worry