Hello, I’m working on a simple 2D tower defense game.
I’m very new to Unity.
I have a Tower Game Object with a Circle Collider, simulating the shooting range.
Right now i only want to get a message when an Enemy enters my range.
But nothing works
This is my tower
and this is my enemy
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Tower_Collider : MonoBehaviour {
void OnTriggerEnter(Collider other)
{
Debug.Log(" TRIGGER ENTERED");
}
void OnCollisionEnter(Collision col)
{
Debug.Log("COLLISION DETECTED");
}
// Use this for initialization
void Start () {
}
// Update is called once per frame
void Update () {
}
}
What am I doing wrong?