So I want to be able to click on these targets and have them destroy themselves. Right now I have many OnMouse functions all just trying to print something for testing. For whatever reason it doesn't fire. I'm sure theres something simple I'm missing. Anyones help is greatly appreciated. Here is a picture of Unity itself and the code.
using UnityEngine;
using System.Collections;
public class TargetLogic : MonoBehaviour
{
// Use this for initialization
void Start ()
{
}
// Update is called once per frame
void Update ()
{
//print("ok");
}
void OnMouseDown()
{
print("Works");
}
void OnMouseEnter()
{
print("Enter");
}
void OnMouseUp()
{
print("up");
}
void OnMouseOver()
{
print("Over");
}
}
I also Have tried with a 2d Rigidbody as shown here