unity coroutine is running code example
Example: how to check if a coroutine is running unity
void InvokeMyCoroutine()
{
StartCoroutine("Coroutine");
}
IEnumerator Coroutine() {
CR_running = true;
//do Stuff
yield return //Whatever you want
CR_running = false; }
// As long as you a within this scope you can just do :
void AnotherFunction() {
if (CR_running)
{
// Do some other stuff;
}
}