I entered the sample code from this page (C#)
http://unity3d.com/support/documentation/ScriptReference/Coroutine.html
IEnumerator WaitAndPrint() {
yield return new WaitForSeconds(5);
print("WaitAndPrint " + Time.time);
}
IEnumerator Awake() {
print("Starting " + Time.time);
yield return WaitAndPrint();
print("Done " + Time.time);
}
You would expect the second print to come 5 seconds after the first, but instead this is what I got.
Starting 0
Done 0.02
basically 1 fixed update frame.
When I tested the Javascript version of the same code (again, taken verbatim from the site), I got the correct results. Is this a bug?