So I’ve been following this 1 and for the most part, everything works. But when I get to the falling and respawning part but Unity is saying the code is wrong. Does anyone know what the error is? The code I’ve been using is this;
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
void OnTriggerEnter2D (Collider2D other)
{
if (other.gameObject.CompareTag("Player"))
Application.LoadLevel(Application.loadedLevel);
}
}