Loading new scene after time

Hi, So I’ve been researching this and the best i’ve found is:

#pragma strict

function Start() {
    yield WaitForSeconds(15);
    Application.LoadLevel("Bootcamp");
}

function Update () {

}

Although it gives me some errors. Whats missing or wrong? By the way Unity 4.0 + thats the .JS

Thanks

For anyone looking for an updated answer to this.

A small note to the original question, its not working due to the code being synchronous, meaning all code runs as if its a single script. you need to create an Asynchronous Function and call it by using StartCoroutine. this will run the function on the side, apart from the rest of the code so only the LoadScene will be delayed and not your entire application.
Hope this helped

using System.Collections;
using UnityEngine;
using UnityEngine.SceneManagement;

public class SceneChange : MonoBehaviour
{
    public float delay = 440;
    public string NewLevel= "Bootcamp";
    void Start()
    {
        StartCoroutine(LoadLevelAfterDelay(delay));
    }

    IEnumerator LoadLevelAfterDelay(float delay)
    {
        yield return new WaitForSeconds(delay);
        SceneManager.LoadScene(NewLevel);
    }
}

Try this:

public float delay = 15;
public string NewLevel= "Bootcamp";
 void Start()
{
    StartCoroutine(LoadLevelAfterDelay(delay)); 	
}

IEnumerator LoadLevelAfterDelay(float delay)
{
 yield return new WaitForSeconds(delay);
 SceneManager.LoadScene(NewLevel);
}

Try This:

void Start(){
       Invoke("MyLoadingFunction",15f);
}
void MyLoadingFunction(){
       Application.LoadLevel("Bootcamp");
}

you cant use yield in start or update function its easier to do:

#pragma strict
 var time : float = 0;
function Start() {
    time = 15;
}
 
function Update () {
    if(time > 0){
       time-=Time.deltaTime;
    }else{
       Application.LoadLevel("Bootcamp");
    }
}