application.quit not quitting game?
So, I've been building the main menu, setting up the new UI and such, and I've hit a snag. The exit button on the menu opens up the standard 'do you want to quit? y/n' and supposedly when I click yes it should run the following:
public void ExitGame()
{
Application.Quit();
}
I'd appreciate any tips in regards to debugging.
Answer by Dave-Carlile · Aug 27, 2015 at 06:00 PM
Add a call to Debug.Log
inside your ExitGame
function to make sure it's being called.
Also, are you running the editor? Application.Quit doesn't function there.
added the debug .log, still not being called. I tried both in the editor and built the game as is to test. Still nothing.
How is ExitGame
supposed to be called? What code do you have that's calling it?
Answer by Maruder · Sep 14, 2015 at 01:56 AM
To test this functionality out, you must build you game first.
Go to file-> build settings
Click on Add current if you haven't added the scene you are debugging
Pick the PC, Mac, & Linux Standalone option under Platform
Click Build And Run
After all those steps have been followed, you should be able to see if quitting the game works.
Your answer
Follow this Question
Related Questions
I guys I have a really hard question 0 Answers
How to add a editing option to variables in a script in Inspector? 0 Answers
How to create buttons with script? 0 Answers
Side-scrolling Enemy AI not shooting in the right direction 0 Answers
How to make a random object generator that responds to simple touch? 0 Answers