how to make a coroutine stop in unity code example
Example: stop specific coroutine unity
Coroutine co;
// start the coroutine the usual way but store the Coroutine object that StartCoroutine returns.
co = StartCoroutine(MyCoroutine());
// stop the coroutine
StopCoroutine(co);