Created
February 8, 2017 03:59
-
-
Save unitycoder/290c8376e8eab3ee0ea02773cd70fc5e to your computer and use it in GitHub Desktop.
Stop StartCoroutine before Running it again
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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