- Home /
Question by
DoYouLikeMilk · Aug 10, 2015 at 10:47 AM ·
c#level loadlevelload
Help With Level Load
Hello, I am using unity5 1.2f1 In 2D and i am trying to make a level load script. The script says 'The name application' does not exist in the current context' and 'The name
OnCollisionEnter' does not exist in the current context.' Can anyone help?
using UnityEngine; using System.Collections;
public class LevelLoad : MonoBehaviour {
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
OnCollisionEnter ();
{
application.LoadLevel ("1");
}
}
Comment
Answer by allenallenallen · Aug 10, 2015 at 10:48 AM
You must be new to scripting in general.
OnCollisionEnter() is a separate method that you have to put outside of Update().
When coding, capitalization is important. It's "Application" not "application"