Closing the game

i want the esc button to close the game so how do i do it

function Update ()
{
	 If(Input.GetButtonDown("esc"));
	 {
		Application.Close
	 }
}

Application.Close am i using the right command[/code]

No, but this is where you look up the Application class in the docs, so you can find out what the command actually is.

–Eric

ty now i know why it was not working i was using app.close but its app.quit