Hi guys
i have a script attached to my player so when it collides with a certain object which is a trigger it loads the next level. i have written a script but it wont work. I am using the 2d unity 3d because i am making a 2d game.
The Script
using UnityEngine; using System.Collections;public class NextLevel : MonoBehaviour {
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
}
void OnTrigger2DEnter(Collider collision){
if (collision.gameObject.tag == "Finish") {
Application.LoadLevel("2");
}
}
}