Load Level

Hi all. I’ve been having a problem with this script. It says “Awake is not a couroutine” How do I fix this? I want the script to play on awake and wait 10 seconds and then load another scene.

function Awake() {
{
yield WaitForSeconds (10);
Application.LoadLevel(2);
}
}

Get rid of the bit that’s fail. If you want more, you need to give more (i.e code), you have enough karma to know that.

Or start another coroutine in Awake:

function Awake()
{
	Wait(10);
}

function Wait(time:float)
{
	yield WaitForSeconds(time);
	Application.LoadLevel(2);
}