- Home /
Is there a method that calls when a game Closes via the Close Button?
In Windows or OSX, when you click the "Close" button, in a Windowed game, is there something I can tie the game to for functions, so I can throw up a "Are you sure?" message box?
Sometimes the game crashes when I close it with this method, so I'd like to be able to catch it, just incase...
Comment
Best Answer
Answer by Mike 3 · Dec 08, 2010 at 07:58 PM
OnApplicationQuit is called, you can stop it from quitting with Application.CancelQuit(); inside there
Thanks! Exactly what I was looking for. I couldn't find it easily before.
Your answer
Follow this Question
Related Questions
Typing text and close the box 0 Answers
Issue with OnGUI close button. 1 Answer
Closing/hiding an open Gui Button when clicking on it 1 Answer
Simple Script - and no result 2 Answers
Scripted Data Line Reading 1 Answer