private IEnumerator UpdateTweenCoroutine(TweenShader tweenShader) { while (true) { updateMethod.Invoke(tweenShader, emptyArgs); SceneView.RepaintAll(); if (!tweenShader.duration.IsRunning) { break; } yield return(null); } playCoroutine.Stop(); playCoroutine = null; tweenShader.enabled = wasTweenEnabled; }
/// <summary> /// Start an editor coroutine. /// </summary> /// <param name="routine"></param> /// <returns></returns> public static EditorCoroutine Start( IEnumerator routine ) { EditorCoroutine coroutine = new EditorCoroutine( routine ); coroutine.Start(); return coroutine; }