Hello all,
I’m trying to use yield WaitForSeconds, but I’m not getting good results, my problem is that the routine where yield exists isn’t executed. I’m using C#
Example: (Edited from: Overview: Coroutines & Yield)
public class example : MonoBehaviour {
void Start()
{
Example();
}
IEnumerator Do() {
print("Do now");
yield return new WaitForSeconds(2);
print("Do 2 seconds later");
}
void Example() {
Do();
print("This is printed immediately");
}
}
Example() is fully executed (that is OK) but Do() isn’t (no prints). What can I do? Thanks in advance and sorry my bad english.