public static void WakeUp()
            {
                lock (stateLock)
                {
                    if (isAwake)
                    {
                        return;
                    }
                    if (!isInstanceCreated)
                    {
                        if (isQuitting)
                        {
                            return;
                        }
                        try { instance = CreateHiddenInstance(); }
                        catch (Exception e) { Debug.LogWarning("Caught exception while creating hidden UpdaterBehaviour.\n" + e.Message + "\n" + e.StackTrace); return; }
                        if (instance == null)
                        {
                            return;
                        }
                        isInstanceCreated = true;
                    }
                    instance.gameObject.SetActive(true);
                    isAwake = true;

                    if (endOfFrameCoroutine == null)
                    {
                        endOfFrameCoroutine = instance.StartCoroutine(instance.EndOfFrameUpdate());
                    }
                }
            }
 private static void OnQuitting()
 {
     lock (stateLock)
     {
         isQuitting = true;
         instance   = null;
     }
 }
        public static bool Initialize(bool wake = false)
        {
            if (isManagerCreated)
            {
                if (wake)
                {
                    ManagerUpdater.WakeUp();
                }
                return(true);
            }
#if UNITY_EDITOR
            if (!UnityEditor.EditorApplication.isPlaying)
            {
                UnityEngine.Debug.LogError("LiteCoroutine only supported in playing mode");
                return(false);
            }
#endif
            defaultManager = new Manager();
            if (wake)
            {
                ManagerUpdater.WakeUp();
            }
            return(isManagerCreated = true);
        }
 public static void WakeUp()
 {
     ManagerUpdater.WakeUp();
 }