- Home /
Toggle/Button is Clickable Behind Image unless Image has no Parent?
I have a Toggle behind a Image, and for some reason it is clickable despite the image on top being both a raycast target and having a CanvasGroup component with "Blocks Raycasts" checked. This also happens with Buttons.
If I have this Structure:
- Root:
-
- Button
- Image
Then the Button cannot be clicked, however:
- Root:
-
- Button
- RectTransform
-
- Image
Does not block the button from being clicked, even if the RectTransform also has a CanvasGroup that blocks raycasts.
Any idea why? Is this a bug? I don't seem to recall this being the case previously.
Using Unity 5.4.
Your answer
Follow this Question
Related Questions
How to click on irregular buttons in new ui 4 Answers
Holding down UI Button and shooting raycast from touch position doesn't work simultaneously:(( 0 Answers
how to set a public GameObject when button clicked 2 Answers
Unity 5 new UI Button Colliders moved to the left in different resolutions 1 Answer
Detect only UI button click 3 Answers