I have a box collider on my blocks where the script is attached…
and the code in the script is.
using UnityEngine;
public class MouseDetect : MonoBehaviour
{
void OnMouseOver()
{
Debug.Log("mouse is over" + gameObject);
}
}
I don’t understand… seems pretty simple
I tried
using UnityEngine;
public class MouseDetect : MonoBehaviour
{
void OnMouseOver()
{
Debug.Log("mouse is over" + gameObject.name);
print("hello");
}
}
but that didn’t do anything either