Qvih
1
Hi! I upgraded to Unity 4.2 and suddenly I had a problem with the Update function. I made a function GoAndRun() and in it has conditions for making gameobjects disabled/enabled. When the Update function runs the GoAndPlay(), it keeps on running it even though the If conditions are false. Here are pictures.
[15534-update+problem+1.png|15534]
[15535-update+problem+2.png|15535]
Thats because the GoAndRun() is being called everyframe by your Update, and you can’t have a WaitForSeconds() within an Update.
You’re almost there though -you need to make a boolean trigger to prevent it being called every frame:
function GoAndRun(){
if(part1 == true && part1Wait == false){
part1Wait = true;
yield WaitForSeconds(3);
part1 = false;
part2 = true;
//etc ...
Also, it’s helpful if you actually paste your code into the question as I can then C/P it and edit it, instead of having to keep scrolling up and viewing the code. Anyway - try something like that (do it with your part2 as well), also you will need to reset them after, else it will only be called once.