Unity 4.1 "yield" issues

Hi All,
I updated to unity 4.1 last week and noticed a few of my scripts were playing up. It seems to be related to when I use the yield function,
This for instance will never print 2 in some cases (and I don’t receive any errors).

	print ("1");
	yield WaitForSeconds(.2);
	print ("2");

I’m really at a loose end with this one and it has brought my project to a complete standstill. :frowning:
Any ideas?
Thanks
Pete

C# or UnityScript? In C# you need To put the return keyword

yield return new WaitForSeconds(0.2F);

Perhaps your Time.timeScale value has become 0 somehow?

Thanks guys,
I’m using UnityScript and I’m pretty sure the timescale hasn’t been modified.
This is a project that I’ve been working with for two years and the it wasn’t having this problem in unity 4.0.
I’ll have to start stripping things back and see if I can make a simplified version that replicates the issue. :frowning:

There are some issues with 4.1 (and even pulled 4.1.1) so do use the bugreporter, to let them know as they do take it seriously.

I think i finally figured this out!
If you start a coroutine from a script that is on an object that you deactivate or destroy it will never finish. Im sure this was not the case pre 4.1.

Anyway I made a quick demo of the issue -
http://www.naffupdate.com/forumfiles/CoroutineIssue/CoroutineIssue.html