Hi! Sorry for the newbie question - I’ve looked around but I just can’t work out why this is happening:
I’ve attached the below script to a game object in my title scene, and want the main scene to load if either of the 4 arrow keys are pressed.
But as soon as I open the title scene, the main scene loads immediately after, without any keys being pressed!
If anyone can help - it will be so much appreciated!!
function Update () {
if ((Input.GetKeyDown(KeyCode.UpArrow) == true));
else if ((Input.GetKeyDown(KeyCode.DownArrow) == true));
else if ((Input.GetKeyDown(KeyCode.LeftArrow) == true));
else if ((Input.GetKeyDown(KeyCode.RightArrow) == true));
Application.LoadLevel (1);
}
Laurien