Search Unity

Is there an EditorApplication Exit Event?

Discussion in 'Immediate Mode GUI (IMGUI)' started by McDev02, Apr 23, 2018.

  1. McDev02

    McDev02

    Joined:
    Nov 22, 2010
    Posts:
    664
    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:
    317
    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:
    664
    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:
    140
  5. McDev02

    McDev02

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

    Harinezumi

    Joined:
    Jan 7, 2013
    Posts:
    54