- Home /
UI - How can I prevent a Rect Transform on a canvas from blocking clicks?
Hello
Say I have 3 objects on a canvas, disposed as follows: (each is parent of the next)
Canvas
- object1
- object2
- object3
Now imagine each of these to be in ascending order in area, (area of object1 > area of object2 > area of object3).
Currently, when I check in event system and I'm clearly over the smaller object2 or object3 rect transforms, it flags it as being in object1.
I've also tried not making them parent -> child, and just one after the other in the hierarchy, but it did not help.
Strangely, I have a slider as a child of object3, which works fine and is interactive as it should be (in both hierarchal layouts).
How can I remedy this problem, and have object2 and object3 properly intercept the clicks?
Worth noting: object2 and object3 have an EventTrigger component; also, there is an EventSystem in place.
Answer by Larry-W · Feb 19, 2015 at 06:13 AM
I guess the component responsible for tracking clicks is the CanvasRenderer, because as soon as I added one (via an image with 0 alpha and no pointers), everything worked!
If it can help anyone...