- Home /
Help with input code please (c#)
Hi Guys, I am trying to write a script where when i press enter i go to the next scene, but i cant seem to get it to work.
using UnityEngine;
using System.Collections;
public class MenuToLevel : MonoBehaviour {
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
if(Input.anyKeyDown)
{
Application.LoadLevel("1");
}
}
Thank You
Comment
Best Answer
Answer by wildex999 · Mar 15, 2014 at 11:14 AM
The if has to actually be inside the Update() function. Does this even compile?
Your answer
Follow this Question
Related Questions
Multiple Cars not working 1 Answer
Distribute terrain in zones 3 Answers
Player movement isn't working 1 Answer
Menu, Game mode Array String to change settings? 1 Answer
Menu made of gameobjects C# 2 Answers