Hi I’m trying to use the Killzone prefab to restart my scene when the player falls off a platform. My character goes through the collider and nothing happens? Does it need any additional code? also my character is just the default robotboy prefab.
this is the restarter script it uses
using System;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace UnityStandardAssets._2D
{
public class Restarter : MonoBehaviour
{
private void OnTriggerEnter2D(Collider2D other)
{
if (other.tag == “Player”)
{
SceneManager.LoadScene(SceneManager.GetSceneAt(0).path);
}
}
}
}