Sorry if this is a newbquestion.
I want to switch scenes in my game with some keypress. For example when i press 1 i want level 1 to be loaded. I’ve tried to write the script (as you can see below) but where do i applicate/attach the script?
function Start () {
}
function Update () {
if (Input.GetKeyDown ("1")) {
Application.LoadLevel("Level1");
}
else if (Input.GetKeyDown ("2")) {
Application.LoadLevel("Level2");
}
else if (Input.GetKeyDown ("3")) {
Application.LoadLevel("Level3");
}
}