I just upgraded to Unity 5.2.1p4 and I am having some issues with the UI.
My parent object has an image, a button and its child object has an image. When I click on the child object, it doesn’t block the Raycast and the parent button (behind it) gets the click. I thought Images are supposed to block Raycasts. I even tried using a Canvas Group and setting its “Block Raycasts” to true, with no success.
The only way I found to prevent the raycast propagation was adding an empty, non-interactable button to the child object, which I think is too much.
Am I missing something or did something change on the last updates?
EDIT: There is an example project (about 30Kb): Zippyshare.com - [now defunct] Free File Hosting
Clicking on the black square triggers the white button. The only way to make the black square blocking the raycast is by adding an empty button to it.
If I’m not mistaken, There’s a Raycast Target checkbox in Image. Try unchecking that box in the parent Image to avoid blocking the raycasts, since that one is probably first to get raycasted as you navigate to the children in the view.
and if the problem occurs in a button ?
I have a click walk script and it is stupidly activated every time a UI button is clicked, the only way I found was to deactivate and activate the script, inside the button script… which is stupid, the problem is that now I have a visual element (scoreboard with scroll) that does not have an on-click script, making it impossible for me to use my solution…