Level Load unity 5.3 wont work

Hi, i want that after 5 seconds, my game load the level SplashScreen.

So i tryed this in JS ( i use unity 5.3 so i use scene managers)

import UnityEngine.SceneManagement;

function Start() {

yield new WaitForSeconds(5);

SceneManager.LoadScene(“SplashScreen”);

}

But it wont work. I tryed so many options, but never one of them work, all levels are in the build settings, i have no compiler errors!

Please Help me :slight_smile:

In the docs it says:

yield WaitForSeconds(1);

without the ‘new’. Maybe that’s a problem in UnityScript.

Also, you said it doesn’t work… Do you mean that it doesn’t wait or it doesn’t even load the new scene? If it’s the latest then the problem is not in the script. Make sure the object with that script is still alive after the waiting, coroutines work as long as the script is still active in the scene.

And another common issue: WaitForSeconds is affected by Time.timeScale. If you paused your game setting it to 0 the wait will never complete.