Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created February 8, 2017 03:59
Show Gist options
  • Select an option

  • Save unitycoder/290c8376e8eab3ee0ea02773cd70fc5e to your computer and use it in GitHub Desktop.

Select an option

Save unitycoder/290c8376e8eab3ee0ea02773cd70fc5e to your computer and use it in GitHub Desktop.
Stop StartCoroutine before Running it again
if (isRunning == true)
{
abortCoRoutine = true; // then inside coroutine loop, check this and yield break;
yield return 0; // need to wait, otherwise startcoroutine starts before previous one ends
}
StartCoroutine(SlideEffectForOldSlide());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment