![]() ![]() If you want to use Application. All you have to do is call the Application.Quit() method and the game will shut itself down immediately. The Application.Quit call is ignored in the Editor. Telling your game to close or quit is a very simple task. ![]() I will go into details on how to deal with various aspects concerning quitting the game below so make sure to keep reading. In this video we see how to make an exit button in Unity, the idea is create a system to quit game by pressing a button from the user interface. Build and run the game first if you want to test your game’s quitting functionality. Some platforms, however, require a different implementation to make the game exit properly.ĭo note that quitting the game using the Application.Quit method will not work when it’s running inside the Play Mode in Unity Editor. This will immediately tell the game to quit. To programmatically quit the game made with Unity, call the Quit method of Application class, i.e. application. Everyone has to take a break at some point, and you will need a way to do that for your users. We can also assign it to joystick button 6 which will allow a controller’s back button to also quit the game. ![]() We can use Cancel for this, since it’s already assigned to the escape key. Often when you’re developing a game and you’re having fun coding all the cool stuff for your game, and you forget that your users need to be able to leave the game. First we will need to setup the Input Manager with a button that will allow the user to quit the application. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |