public void DoSomething(bool start, bool stop, bool stopAll)
 {
     if (start)
     {
         EditorCoroutine.StartCoroutine(Example(), this);
     }
     if (stop)
     {
         EditorCoroutine.StopCoroutine("Example", this);
     }
     if (stopAll)
     {
         EditorCoroutine.StopAllCoroutines(this);
     }
 }
Exemple #2
0
 static void CancelStepPlayLogic()
 {
     EditorApplication.isPaused = false;
     EditorCoroutine.StopCoroutine(mEditorCoroutine);
     mEditorCoroutine = null;
 }
 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);
 }