# UI Ugui

Understands, edits, and generates Unity uGUI Canvas hierarchies, RectTransforms, Layout...

- Repository: https://github.com/Unity-Technologies/skills (1197 stars)
- Category: Design
- License: see repository
- Last updated: 2026-10-30
- Runs scripts: no, instructions only

## Install

Claude Code: `npx skills add Unity-Technologies/skills --skill ui-ugui -g -a claude-code -y`
Codex: `npx skills add Unity-Technologies/skills --skill ui-ugui -g -a codex -y`
Cursor: `npx skills add Unity-Technologies/skills --skill ui-ugui -g -a cursor -y`
Gemini CLI: `npx skills add Unity-Technologies/skills --skill ui-ugui -g -a gemini-cli -y`

## Description

Understands, edits, and generates Unity uGUI Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or prefab UI files.

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

Understand existing Unity uGUI, make targeted edits, and generate new Canvas-based hierarchies.

When working with ScrollRect/ScrollView, read the reference file:
- [references/scrollview-setup.md](references/scrollview-setup.md), Required hierarchy, setup rules, and common failures

## Scope

Determine what the user is asking for:

| Request Type | Action |
|--------------|--------|
| Question about UI | **Understand**, analyze hierarchy, explain structure |
| Change specific element | **Edit**, targeted modification only |
| Create new UI | **Generate**, create new hierarchy |
| Fix/improve existing UI | **Edit**, modify existing, don't rebuild |

**Generate only what is requested:**

| Request | Output |
|---------|--------|
| UI layout | Prefab or scene hierarchy only |
| "with code" / "with logic" / "functional" | Hierarchy + scripts |

**These do NOT imply scripts:**
- "proper buttons" → well-configured Button components
- "working UI" → valid hierarchy that renders
- "menu screen" → visual layout only

## Critical Rules

**Namespace disambiguation:**
- Always use fully qualified type names when creating or referencing UI components
- `UnityEngine.UI.Image`, not `Image`
- `UnityEngine.UI.Button`, not `Button`
- Other namespaces in the project can cause ambiguous type errors

**Verify before modifying:**
- Always check what exists before making changes
- Confirm parent objects exist before adding children
- Verify components are present before modifying properties
- Never assume hierarchy state, query it first

**Incremental fixes over rebuilds:**
- When fixing issues, make targeted corrections
- Never destroy and recreate entire hierarchies to fix problems, destroyed objects cause null reference cascades
- Prefer identifying the specific broken property and fixing only that over rewriting large sections
- **When a fix fails, revert the change** before trying an alternative approach

The rest: https://github.com/Unity-Technologies/skills/blob/HEAD/skills/ui-ugui/SKILL.md
