The Escape Button is a Feature
Unity doesn’t have the a way to exit the game by default once you build it. When it’s played in windowed mode you can hit the close window button with the mouse. The problem is when you go full screen there is no button to exit the game. We need to build this functionality in manually.
Add the following code the detect the Escape key getting pressed to exit the game.
This can’t be used in the Editor. You will need to build to use this.