Search Unity

  1. Get all the Unite Berlin 2018 news on the blog.
    Dismiss Notice
  2. Unity 2018.2 has arrived! Read about it here.
    Dismiss Notice
  3. We're looking for your feedback on the platforms you use and how you use them. Let us know!
    Dismiss Notice
  4. Improve your Unity skills with a certified instructor in a private, interactive classroom. Learn more.
    Dismiss Notice
  5. ARCore is out of developer preview! Read about it here.
    Dismiss Notice
  6. Magic Leap’s Lumin SDK Technical Preview for Unity lets you get started creating content for Magic Leap One™. Find more information on our blog!
    Dismiss Notice
  7. Want to see the most recent patch releases? Take a peek at the patch release page.
    Dismiss Notice

Is there an EditorApplication Exit Event?

Discussion in 'Extensions & OnGUI' started by McDev02, Apr 23, 2018.

  1. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    558
    I am looking for an equivalent to OnApplicationQuit() for the Unity Editor, is this possible?
    I want to show an OK/Cancle Message at that point to remind myself to commit my changes to GIT.
     
  2. BinaryCats

    BinaryCats

    Joined:
    Feb 8, 2016
    Posts:
    126
    Shot in the dark, but maybe if you have an [ExecuteInEditMode] which shows a dialogbox in the OnDestroy() ?
     
  3. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    558
    I tried it with an editor window as all other types may not be Destroyed or have to be in the scene and it doesn't work as I'd assume that OnDestroy is not called or Unity just forces to quit.
    I also tried other things like Finalizers but no chance.
    An equivalent to EditorApplication.update += EditorUpdate; for OnExit would be nice.
     
  4. StylishCoding

    StylishCoding

    Joined:
    Apr 21, 2018
    Posts:
    94
  5. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    558
    Great thanks, now I just have to wait for the first stable version.