Hi so im trying to detect a mouseclick on a gameObject and im using this script:
void OnMousedown()
{
if (gameObject.tag == “Enemy”)
{
Debug.Log(“hit”);
}
}
the tag double checked the tag… and it is correct… whats happening???
Hi so im trying to detect a mouseclick on a gameObject and im using this script:
void OnMousedown()
{
if (gameObject.tag == “Enemy”)
{
Debug.Log(“hit”);
}
}
the tag double checked the tag… and it is correct… whats happening???
It’s OnMouseDown (capitalize the “d”)