Coroutine seens not working...

Possible Duplicates:

Static IEnumerator!?

BCE0005: Unknown identifier: ‘StartCoroutine’.

Hi, I think this IEnumerator here, just don't run... Why?

class Joemerson
    static function Falar(numero : int)
        Legenda.texto = "haha";

    private static function Ler(n : int)
        Legenda.texto = "hehe";
            yield WaitForEndOfFrame();

"Legenda.texto" change the text of a GUItext, and with the change, another script show it at the screen in the same time...

The output is: haha

So, the IEnumerator just don't run!


As i wrote already in my comment on mike's answer in your other question. Coroutines only work in MonoBehaviour instances. If the coroutine itself is static it have to be invoked via StartCoroutine of any script instance.