- Home /
simple question. js script. opposite to start function.
Hi there. Just a quick question.
I've got a scene which uses a js script. I'm using the
function Start () {}
function when the scene loads. All straightforward so far, but what is the function for when the scene is closed? Either by quitting the program, loading another scene, or when the play button is then unchecked inside unity?
Many thanks.
Answer by Blaque · Feb 08, 2015 at 09:12 PM
Hi, in order to manage the game quit you can use
function OnApplicationQuit () {}
For the other cases you have to manage them by yourself, you can do it using functions and flags defined by you
Your answer
Follow this Question
Related Questions
Question about asset memory not freed after calling SceneManager.UnloadSceneAsync() 0 Answers
UnloadSceneAsync() does not seem to work with additive scenes. 1 Answer
Forcing scene to unload 1 Answer
How Do i Get Rid Of A Scene Without Deleting It's Objects 1 Answer
How to stop loading of a scene that's loading using SceneManager.LoadSceneAsync ? 1 Answer