The Escape Button is a Feature

--

If you have tried to build your game for fullscreen mode you may have noticed that there is no way to quit from the game. Usually in a game you can use the Escape key to quit a game or at least bring up menu where you can quit the game. Lucky for you this is super easy to add. In your GameManager script go to your Update function. Add an if statement to check if it received input from the escape key. If it has you can call the function Application.Quit to close out the game.

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

See, super easy. Now you can re-build your game for fullscreen mode and now you can quit the game using the escape key.

Good Luck Adventurer!

-Chris

--

--

No responses yet