[Note: I posted this Question before, but it seems to have been swallowed up during the latest forum-troubles. Oddly, it still appears in the search, but the link in the search does lead to a quite different thread.]
Like many other people, I have trouble with “which item receives a click”.
My scene has 3d-objects that have a Collider and are clickable thanks to a RayCaster on the camera.
It has the typical UI-Buttons.
It has UI-Panels (=Images) that implement drag&drop with the help of IBeginDragHandler / IDragHandler / IEndDragHandler.
Problem is (like usually) that the clicks are not received by the element that should receive the click.
I found answers/solutions to the problem, mostly along the line of “insert a Canvasgroup here and there, switch the BlocksRaycast-Setting and the IgonoreParentGroup-Setting to true on that one and…”
That might work in a specific instance. But I found it points to a much bigger problem:
I have no idea why these solutions (should) work.
What is the general philosophy behind that? How is the “hierarchy” of click-receiving defined? In which case does one object receive the click, In which case does the other, in which case do both and in which case does neither? How do Raycaster, Colliders, Buttons and other methods (like IBeginDragHandler) interact?
I would be glad if someone could tell me about some kind of resource about this. An article would be great, but something clear in the documentation or a video would also be good.
Of course I am also happy about people who could explain the “big picture” right away.