Answer the question
In order to leave comments, you need to log in
Why are Raycasts not working in the UI?
There is a Canvas overlay on which a transparent Image is stretched with raycast target enabled (Needed to control the player through IDragHandler events, etc.). There is also a world space canvas that has a button. This button does not respond to clicks. How to fix it ? I think that this trouble solves the settings changes in the GraphicsRaycaster, but it doesn't work for me. BlockingMask changes are completely ignored. If you remove the raycast target from the canvas overlay on the image and put "UI World" in the Blocking Mask, then put layer "UI World" on the world canvas, raycasts will work, although this is not logical. Or am I misunderstanding something?
Overlay canvas
settings World canvas
settings Camera settings
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question