using UnityEditor; namespace ParrelSync { [InitializeOnLoad] public class EditorQuit { /// /// Is editor being closed /// static public bool IsQuiting { get; private set; } static void Quit() { IsQuiting = true; } static EditorQuit() { IsQuiting = false; EditorApplication.quitting += Quit; } } }