public static Coroutine StartCoroutineEx(this MonoBehaviour self, IEnumerator routine, out UnityCoroutine unityCoroutine) { if (routine == null) { throw new ArgumentNullException("routine"); } unityCoroutine = new UnityCoroutine(routine); return(self.StartCoroutine(unityCoroutine.Start())); }
public IDisposable Play(ICursor cursor) { if (cursor == null) { throw new NotImplementedException(); } IEnumerator coroutine = new Coroutine(this, cursor); var canceler = UnityCoroutine.Start(coroutine); return(canceler); }