So does StopAllCoroutines also CancelInvoke ?

every great piece of code to blow stuff up, starts with this…

  CancelInvoke();
  StopAllCoroutines();

but I’m just curious, does anyone know if the latter actually does anyway the former (or indeed, vice versa?)

Thanks!

Another related point to stuff in here: I’ve always assumed that - this is in Javascript - any routine which uses yield; even once, is then, a coroutine. Is that correct?

But then, if you stick :IEnumerator after the function name, does that force it to be a coroutine? What about if you have the :IEnumerator, but, actually never use yield; in the routine? Again this is U/S

No big deal just curious if anyone happens to know precisely the exact amswer to this. Cheers

No, StopAllCoroutines won’t cancel any Invoked functions, nor will CancelInvoke affect any coroutines. (But come on, it would take you 10 seconds of experimentation to confirm this!)

Unityscript can use type inference for functions as well as variables, so yes, any usage of yield implicitly causes the function to return IEnumerator.

As to whether a function that returns IEnumerator but never actually does any coroutine stuff would be called a coroutine, that’s perhaps a matter of semantics, but I would say no: coroutines always return IEnumerator, but it’s not true that an IEnumerator always means you’re using it in a coroutine.