The Escape Button is a Feature.

As I intimated in ‘How to Build and Test Our Unity Game’, if we want our game to run in Fullscreen we need to code a way to exit the game; since there is no built in functionality for that.

Therefore, if we type; application exit unity into Google; the first thing to come up for me is:

Clicking on this link will bring up:

With the description:

The description tells us that Application.Quit will be ignored in the Unity Editor, therefore, after adding the below code:

To the Update() method of our GameManager script and saving it, we will need to build the game and run it to have the escape key work.