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.
- Create a new script called “QuitManager”.
- Replace the default code in the class with the following:
(Add an Update Input check in this script too if you want)
3. Call “QuitManager.QuitGame();” from any script, or from a Click event on a UI button. Or any other way I haven’t thought of.