public void StopCoroutines() { if (!Application.isPlaying) { #if UNITY_EDITOR foreach (var enumerator in enumerators) { if (enumerator != null && Panel != null) { EditorCoroutine.StopCoroutine(enumerator, Panel); } } #endif } else { foreach (var coroutine in coroutines) { if (coroutine != null && Panel != null) { Panel.StopCoroutine(coroutine); } } } coroutines.Clear(); enumerators.Clear(); }
public static void StopCoroutine(this EditorWindow thisRef, string methodName) { EditorCoroutine.StopCoroutine(methodName, thisRef); }
public static void StopCoroutine(this EditorWindow thisRef, IEnumerator coroutine) { EditorCoroutine.StopCoroutine(coroutine, thisRef); }