I have an image with my monobehavior
public class OnUp : MonoBehaviour, IPointerDownHandler, IPointerUpHandler{
public void OnPointerDown(PointerEventData p) { }
public void OnPointerUp(PointerEventData p) {
Debug.Log(p.hovered[0]);
}
}
Trying to make it call OnPointerUp.
The trick is:
-
I click aside from my gameObject,
-
then drag cursor into this image
-
and release the mouse while over this image.
The OnPointerUp doesn’t fire. That’s because it didn’t receive OnPointerDown()
(I clicked to the side of it), is there a way to bypass it?