I’m trying to write a script so that when you collide with the object at the end of a 2D platformer you get to the next level, however I attached it to the object (the object has a rigidbody2d and box collider attached, and “is trigger” ticked) but nothing happens
The script is something like this
#pragma strict
import UnityEngine.SceneManagement;
public class SceneManagement extends MonoBehaviour {
function OnTriggerEnter (Player: Collider) {
SceneManager.LoadScene("Level 2", LoadSceneMode.Single);
}
}
No idea where I’m going wrong here