Figure: Diagnostic workflow: Inspect hit targets → Exclude decorations → Test controls and CPU time
Figure: Diagnostic workflow: Inspect hit targets → Exclude decorations → Test controls and CPU time

Cause and mechanism

Graphic Raycaster finds uGUI elements under a click or tap. Images and text that do not need input can add unnecessary candidates. Check Raycast Target flags, Raycasters on each Canvas, the input module, and Blocking settings that let other objects obstruct UI hits.

Check and correct the setup

  1. Disable Raycast Target on decorative graphics while retaining a suitable hit target for each control.
    Inspect input targets in front
    Inspect input targets in front
  2. Remove raycasters from noninteractive canvases and check input filters/masks.
    Inspect input targets in front
    Inspect input targets in front
  3. Canvas splitting mainly limits rebuild scope; it does not automatically reduce raycast candidates.
    Inspect input targets in front
    Inspect input targets in front

Limits and verification

Disabling all targets also disables interaction. Test clicks, touch, scrolling, and dragging while measuring CPU time.

A focused diagnostic setup

Use one canvas with an interactive button and decorative graphics. Separate disabling decorative Raycast Targets from removing the canvas raycaster.

Test in this order

  1. Profile input raycasting separately from layout/graphic rebuilding.
    Inspect input targets in front
    Inspect input targets in front
  2. Disable decorative targets incrementally while retaining the button’s intended hit graphic and checking transparent foreground panels.
    Inspect input targets in front
    Inspect input targets in front
  3. Test pointer, touch, scrolling and dragging while comparing candidate work and CPU time.
    Inspect input targets in front
    Inspect input targets in front

Interpret the result

Removing a raycaster can remove required interaction. Inspect CanvasGroup blocking, button interactability and foreground occlusion separately.

Related explanations

References