Answers for "how to check if a coroutine is running unity"

C#
-1

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;   
  } 
}
Posted by: Guest on January-21-2021

Code answers related to "how to check if a coroutine is running unity"

C# Answers by Framework

Browse Popular Code Answers by Language