So, I’m making a game for a school project. I’m using the base 2D asset robot character with a different art on it, and I’m trying to set it up so that when my character walks onto a platform then the level will change. The platform has a Box Collider on it already.
using UnityEngine;
namespace UnitySampleAssets._2D
{
public class LevelChanger : MonoBehaviour
{
private void OnTriggerEnter2D(Rigidbody2D other)
{
if (other.tag == "Player")
Debug.Log ("Working!");
}
}
}
This is the code I’ve been working with. I’ve checked that the Player tag was correct and all.
Any ideas as to what the issue may be?