Esempio n. 1
0
    public void Stop()
    {
        if (Application.isEditor && !Application.isPlaying)
        {
            EditorCoroutine.StopAllCoroutines(this);
        }
        else
        {
            StopAllCoroutines();
        }

        isPlaying = false;
        UpdateView();
    }
 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);
     }
 }
Esempio n. 3
0
    IEnumerator FpsStepper()
    {
        while (true)
        {
            if (wrapMode == WrapMode.Oneshot && frameIndex == frames.Count - 1)
            {
                if (Application.isEditor && !Application.isPlaying)
                {
                    EditorCoroutine.StopAllCoroutines(this);
                }
                else
                {
                    StopAllCoroutines();
                }
            }
            Next();



            yield return(new WaitForSeconds(1 / fps));
        }
    }
 public static void StopAllCoroutines(this EditorWindow thisRef)
 {
     EditorCoroutine.StopAllCoroutines(thisRef);
 }