- Home /
Question by
YourGamesBeOver · Mar 05, 2014 at 10:44 PM ·
editor
Is there a way to run a script when the editor closes?
I looked into this, and only found information referring to the attribute InitializeOnLoad. Is there some kind of InitializeOnExit or some equivalent?
Comment
(InitializeOnLoad
has a pretty good page at http://docs.unity3d.com/Documentation/$$anonymous$$anual/RunningEditorCodeOnLaunch.html)
Not sure if this would be the same, but why not just launch unity through a bat/shell(assu$$anonymous$$g that those work on OSx) script that launched unity and then whatever you need launched/done after Unity closes ?
I thought about doing that, but I need my script to run when unity begins to close. Also, due to a bug in my setup, Unity usually freezes when it tries to close (the ADB bug), so I really can't wait until it closes on its own