Troubleshooting UI
Most problems come down to one of a handful of things: Raycast Target is off, a canvas isn't visible, or a widget is looking for a child it can't find by name.
My button won't click
Work down the list:
- Is Raycast Target on for the button's own Rect Transform? It's off by default on every element — see Components.
- Is Interactable on, on the UI Button itself?
- Is the button's Canvas Visible? A hidden canvas neither renders nor receives clicks.
- Is something else on top of it? A canvas (or element) with a higher Sort Order draws over — and is clicked before — one underneath. A full-screen backdrop with Raycast Target on will swallow clicks meant for something behind it.
- Is there a script on the button's own entity overriding
OnClick? It has to be on the same entity as theUIButtonComponent— see Scripting.
My slider or toggle doesn't visually respond
- A Slider needs child entities named exactly
FillandHandle; a Toggle needs one named exactlyCheckmark. These are matched by name, not by a reference field you set — a typo or a missing child means nothing to animate. - Check Components and Components for the exact expected names.
My progress bar doesn't move
Same shape as above — it needs a child named Fill. If you're driving Value from a script, confirm the script actually has a reference to the right entity (see Scripting) — GetComponent<UIProgressBar>() returns null on an entity that doesn't have the component, and a null-checked call that silently does nothing looks identical to "it's not working."
My scroll view doesn't scroll
- It needs a UI Mask component alongside the UI Scroll Rect.
- The scrollable content needs to be a child entity named exactly
Content. - Check Horizontal/Vertical are turned on for the direction you're trying to scroll.
My UI looks the wrong size on a different resolution
Check the Canvas's Scale Mode and Reference Resolution — see Components. Scale With Screen (the default) keeps proportions but can letterbox at very different aspect ratios; Match Width/Match Height favor one axis over the other; Constant Pixel doesn't scale at all, which looks tiny on a high-resolution display.
Content overlaps a notch or rounded screen corner
Turn on Apply Safe Area on the Canvas (on by default, so check nothing turned it off) — see Components.
My script can't read a Slider's value / react to a Toggle changing
This isn't a bug — there's no C# access to Slider, Toggle, Layout Group, Mask, or Scroll Rect yet. See Scripting for what's scriptable today and a workaround.
Keyboard/gamepad navigation skips or jumps to the wrong element
- If Interactable is off on a Selectable, it's correctly skipped — turn it on if that wasn't intended.
- Up/Down/Left/Right left on (Auto) picks the nearest neighbor by position — an oddly shaped or overlapping layout can pick a neighbor that looks wrong. Set the direction explicitly on the elements involved; see Components.
My Screen Space Overlay canvas doesn't show at all
- Check Visible is on.
- Check the Canvas has actual children with Rect Transforms — a Canvas by itself renders nothing.
- If you're looking in the Game viewport specifically, confirm you're not accidentally looking at a different open scene's canvas.
A file I just made doesn't work
A file created outside the editor a moment ago isn't recognized yet. Close and reopen the project so the editor picks it up.
See also
- Components — every field referenced above
- Scripting — what's driveable from C# today, and what isn't yet