OnPointerDown eventData.clickCount always zero?

I have the following code in my UI component:

public void OnPointerDown(PointerEventData eventData) {
   Debug.Log ("click " + eventData.clickCount);
}

but it always returns 0, no matter how many times I click or double-click, so I assume I’ve missed something? I can drag and drop just fine, I can click on things, but the clickCount is always 0, so I can never know if I’ve double-clicked.

Just for completeness sake, you script implements IPointerDownHandler and you are interested in the events clickCount.

However I believe for clicks you actually need to implement IPointerClickHandler instead. Please give that a try.

1 Like

This was the answer; thank you!