This question was
closed Jan 11, 2017 at 09:36 PM by
eranikid for the following reason:
The question is answered, right answer was accepted
Pointer Enter and Pointer Exit do work, but Pointer Click doesn't
I have a "Char" prefab with a script, an event trigger and a box collider 
public class UnitObject : MonoBehaviour, IPointerClickHandler
{
public void OnPointerClick (PointerEventData eventData)
{
Debug.Log ("Click fired!");
}
public void OnClick()
{
Parent.ClickedUnit (punit);
Debug.Log ("123");
}
public void OnMouseEnter()
{
Parent.MousoveredUnit = punit;
}
public void OnMouseExit()
{
Parent.MousoveredUnit = null;
}
}
And somehow Pointer Exit and Pointer Enter both work fine, but nor Pointer Click or method from interface doesn't fire, tried to restart Unity, check an uncheck Is Trigger checkbox, but nothing helps, events Pointer Up and Pointer Down also don't work, what am I doing wrong? Help, please.
unity-2017-01-12-00-20-52.png
(26.8 kB)
Comment
Immediatly solved by adding physics raycaster to main camera