I was following a youtube tutorial about creating a load scene script, I followed the tutorials exactly as it is and everything went as it should be in the tutorial but it is not working for me.
Here is the script:
using UnityEngine;
using System.Collections;
public class WinPoint : MonoBehaviour {
public string nextLevel;
void Start () {
}
void Update () {
}
void OnTriggerEnter(Collider Others)
{
if (Others.tag == "W inPoint")
{
Application.LoadLevel(nextLevel);
}
}
}
I attached it to the player and I added the tag WinPoint to the cube object that when I hit unity should load the next level (The cube object is triggered enabled too). Why the script is not working?