- Home /
Is there a way to determine a tap/mouse click has been registered WITHOUT it being registered on a button AND not stopping event bubbling?
Hello! Here's the scenario I'm running into:
I'm going to use the word "click" as synonymous with tapping/mouse clicking. I want to do this through the UGUI event system.
I have a floating clickable object in the UI on screen. If you click it, the object expands and shows detail. What we want to do is, if you click outside of it, the object collapses again. However, that click may register some other item, such as a clickable location in the background or foreground.
We looked at putting a canvas group behind it with "Blocks Raycasts" set to false, but the problem is that it won't register the click. If we turn on "Blocks Raycasts," then you can't click anything underneath it. I've also attempted to use the IPointerDownHandler and the EventTrigger component as well, but I was not able to get them to work.
Does anyone have any suggestions on what I could do?
Thanks!
Your answer
Follow this Question
Related Questions
Cursor.lockstate and OnPointerEnter not working together 2 Answers
Catch pointer events by multiple gameObjects 6 Answers
IPointerEnterHandler doesn't work when object switches parent 1 Answer
PointerEnter / PointerExit keeps triggering on UI Element 0 Answers
Fake pointer up on UI gameobject A and pointer down on UI gameobject B 1 Answer