hi im trying to add an exit on my game.
i have this script on an empty so that when he hits space he goes back to a main menu scene
i added the name of the level in the inspector and have it under the game build.
doesnt work though.
#pragma strict
var levelToLoad:String;
function Start () {
}
function update () {
if(Input.GetButtonUp("Jump")){
yield new WaitForSeconds(0.1);
Application.LoadLevel (levelToLoad);
}
}