How the Check Works
The CheckUIRaycastTargets check looks at uGUI Graphic components (such as Image, Text, and RawImage) that have Raycast Target enabled. For each one it walks up the hierarchy and asks a simple question: can this graphic, or any of its parents, actually respond to pointer input? If it finds no Selectable (like a Button, Toggle, or Slider) and no component that handles pointer events anywhere up the chain, the graphic is flagged.
A graphic marked as a raycast target is tested by the GraphicRaycaster every frame. When nothing along its hierarchy can ever react to that input, those raycasts are pure overhead that buys you nothing.
When to Use This Check
- Trim UI Raycast Overhead: Remove per-frame raycast work from decorative graphics that can never be clicked or dragged.
- Complex Canvases: Especially valuable on dense UIs with many static labels and background images, where unnecessary raycast targets add up.
This check reports with an Info severity by default, since an unnecessary raycast target is an optimization opportunity rather than a bug.
How to fix errors like this
Disable Raycast Target on the reported graphic. The system offers an automatic fix labelled Disable raycast target, which unchecks the option for you (the change is recorded so you can undo it). Only leave Raycast Target enabled on graphics that genuinely need to receive pointer input, or that sit under an interactive element which relies on them to catch clicks.
For problems with UI layout components rather than raycasting, see the related Nested UI Layout Problems check.
