- Home /
Knowing when OnApplicationQuit is really 'quit', webplayer
I have some usage-logging routines which need to all chime in when the web application closes. So I put OnApplicationQuit routines on my tracking objects (which use SendMessage to send their data to the usage-logging object).
I also use OnApplicationQuit on the usage-logging object which has collected all that data and sends it to my server.
The question is, if they all use OnApplicationQuit, how do I ensure that all there data is received by the usage-logging object, which itself must come LAST, so that it can send a full report?
BTW: This is for use with web and mobile apps, so CancelQuitting wouldn't help.
Answer by Mike 3 · Jan 25, 2011 at 03:11 AM
You should be able to use OnDisable for it, which will be called after OnApplicationQuit
Well, for my purposes, not really. As I am uploading some data, which yields, I get 'Coroutine couldn't be started because the the game object 'UsageTracker' is inactive!' (Yes, two consecutive 'the' in there!)
Your answer
Follow this Question
Related Questions
Application.Quit(); dosen't work properly with GUI? 1 Answer
How do I Force Application to Quit if no internet connection available 1 Answer
Webplayer - action on leave page 1 Answer
How do i stop mUnityPlayer.quit() closing the entire android app? 1 Answer
WebPlayer TCPClient connect C# TCPServer app in localhost, posible? 1 Answer