Vincent Taylor

I Need To Escape! Adding The Ability To Quit

It’s a simple and obvious feature, but one that is easily forgotten when you are in the middle of making a game. However, a way to quit the game cleanly is vital, especially for full-screen games.

Today’s Objective: Add Quit functionality to my game.

It’s simple!

  1. Create a new script called “”.
  2. Replace the default code in the class with the following:

3. Call “” from any script, or from a event on a UI button. Or any other way I haven’t thought of.