OnPointerUp

Is it somehow (like a hack or workaround) possible to detect a PointerUp event on an object that did not receive a PointerDown event?

From my quick tests I only ever got a PointerUp event, iff the Behaviour also implements IPointerDownHandler and the mouse-click happened ontop of that object.

For my current project I need to always detect a PointerUp on one object, but the PointerDown does sometimes happen on a different object (or rather one of several).

@Piflik - I think you are correct with your assumptions. I’ve noticed the same, it’s not possible to detect

I discussed (with myself…) this on this thread. Never got any response. I’ve asked this earlier too.

Maybe it’s easy for proper coders to avoid this issue, for me this is a problem… I ended up doing some sort of update based check or event to detect pointer up / exit, I needed to create arcade style buttons, don’t remember exactly.

1 Like

I saw your thread, but I wasn’t sure what you meant by using PointerExit instead. I tried it (in Enditor) and it didn’t work (as I expected). But apparently this does actually work as a workaround on mobile, since PointerExit is called when the finger is removed from the display. As this project is currently being developed for mobile only, this actually covers all use-cases I tested. A drawback is that this event obviously also fires when the finger is moved from the area covered by this gameobject, but this is a compromise I am willing to accept. The object covers the greater part of the screen anyway.

It would still be nice to have a solution for desktop applications.