I’m using the script below to change levels within my game but nothing is happening, I could use some assistance in solving the error which displays: “Script error: OnTriggerEnter2D This message parameter has to be of type: Collider2D”
Here is the script I’m using:
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
public string level = "Stage 2";
// Use this for initialization
void OnTriggerEnter2D (Collision2D Collider)
{
if (Collider.gameObject.tag == "Player") {
Application.LoadLevel (level);
}
}