tea-x-random/unity-game-skills/unity-ui-designer
Claude Code and agent skill by tea-x-random/unity-game-skills
- community
Checking that the SKILL.md file is still in the repository.
Design verified, screenshot-proven UI for casual iOS games in Unity. Use for HUD, menus, overlays, pause/win/lose/settings/level-select screens, title/menu, buttons, score/coin/lives/timer readouts, store/IAP placeholder, reward popups, responsive portrait layout, safe area/notch and home-indicator handling, touch controls, 44pt touch targets, thumb-reachable zones, typography, TextMeshPro, UI Toolkit (UXML/USS), uGUI Canvas/RectTransform, Canvas Scaler, and mobile portrait UI. Builds UI through the unity-mcp-bridge (manage_ui for UI Toolkit, manage_gameobject + manage_components for uGUI), never raw YAML.
Install
npx vskill@latest install tea-x-random/unity-game-skills/unity-ui-designerSKILL.md
The same SKILL.md was published earlier as tea-x-random/unity-game-skills/unity-ui-designer.
Unity UI Designer
Make casual-iOS game UI intentional, readable, responsive, safe-area-correct, and touch-friendly — and prove it with a phone-resolution screenshot, not a design doc. This is the UI phase under unity-game-director; it executes through unity-mcp-bridge.
Doctrine (these override convenience)
- Verified, screenshot-proven UI, not docs. A UI screen is not "done" until a
manage_scenescreenshot at phone resolution shows it laid out, readable, and inside the safe area. - Lean gates. Decide sensible defaults (stack, reference resolution, font sizes) and proceed; only ask the user at real branch points (art direction, screen set scope).
- Build UI through MCP, never raw YAML.
.unity/.prefab/.uxml/.ussreferences are GUID/fileID-linked. Usemanage_uifor UI Toolkit (UXML/USS),manage_gameobject+manage_componentsfor uGUI. Enable the group first:manage_tools(action="enable_group", group="ui"). C# (SafeArea, juice) goes through the script tools and must compile clean. - Branch on the project's UI stack. Read
mcpforunity://project/infoand pick UI Toolkit vs uGUI/TMP from what the project already uses.
Step 0 — Detect the UI stack
Read mcpforunity://project/info and check the UI stack flags:
- Project already uses uGUI / TextMeshPro (Canvas in scenes,
com.unity.textmeshpro/com.unity.ugui) → build uGUI. - Project uses / Unity 6 with UI Toolkit runtime (
com.unity.ui,.uxml/.ussassets, UIDocument) → build UI Toolkit. - Greenfield UI on Unity 6 → default to UI Toolkit (flexbox, percentage units, USS theming scale better across phones). Use uGUI when the project already standardized on it, or for world-space HUD and quick one-off overlays.
Enable the UI tool group before any UI Toolkit work: manage_tools(action="enable_group", group="ui") (this exposes manage_ui).
Safe area / notch — MANDATORY for iOS
iPhones have a top notch/Dynamic Island and a bottom home indicator. Never anchor interactive or critical UI to raw screen edges.
- uGUI: put a
SafeAreaMonoBehaviour on a full-screen RectTransform that all HUD/menu content parents under, driving anchors fromScreen.safeArea:
- UI Toolkit: apply safe-area padding to the root. Easiest: a small runtime helper that reads
Screen.safeAreaand setsroot.style.paddingTop/Bottom/Left/Rightin px (recompute on orientation/resolution change); keep visual padding in USS so content never touches the notch or home indicator.
Responsive layout — portrait, many aspect ratios
Phones range ~19.5:9 (modern) to 4:3 (iPad). Never use absolute pixel positions.
- uGUI Canvas Scaler:
UI Scale Mode = Scale With Screen Size,Reference Resolution = 1080 x 1920,Screen Match Mode = Match Width Or Height,Match = 0.5(start there; bias toward width for portrait-critical layouts). Anchor elements to corners/edges, not center-with-fixed-offset. - UI Toolkit: flexbox (
flex-grow,flex-direction,justify-content,align-items) + percentage /vw/vh-style sizing in USS. Let containers flex; avoid fixed px on layout containers (px is fine for borders/icons). Set the PanelSettings scale mode to scale-with-screen, reference resolution 1080x1920.
Touch targets & thumb reach
- Minimum tappable size ~44x44 pt (
>= ~88 pxat 1080-wide reference / 2x). Pad the hit area even if the icon is smaller. - Spacing between adjacent buttons so a thumb does not hit two.
- Put primary actions in the bottom thumb-reachable zone for one-handed portrait play; reserve the top (under the notch) for passive readouts (score, coins, timer).
Typography
- uGUI: use TextMeshPro, not legacy
Text— it stays crisp when scaled. Generate SDF font assets for the chosen font. - Legible body sizes; avoid tiny labels. Enable Auto Size within a sane min/max for numbers that grow (score, coins). Strong contrast (text vs panel vs world).
- One display font + one UI font max; consistent sizing scale across screens.
- Type the scale, never the size. Don't pass raw point sizes (
28,44,64) into label factories — that's how typography drifts. Pick from a small named scale (Title/Heading/Body/Caption…) defined once. See "Design tokens" below — this is the #1 source of text inconsistency.
Design tokens — one source of truth for a runtime-built UI (do this FIRST)
A casual game's look drifts when every screen sets its own font sizes, colors, paddings, and radii as magic numbers. The fix from established design-system practice (USWDS design tokens, Adobe Spectrum, [Material 3]): define a token layer — a curated palette of named values that everything references — instead of hard-coding values per widget. Tokens are "the smallest unit of a design decision… a single source of truth" (UXPin); the win is that restyling becomes a one-place change that updates every screen at once.
Explicit input — when the project has an `art-spec.yaml`, the token PALETTE is derived from it, never invented here. Read the spec's palette.roles (ground, panel, ink, accent_primary, accent_secondary) + palette arrays (canonical path + legacy roots: docs/PIPELINE_CONVENTIONS.md) and map them onto the theme's semantic color roles. GameTheme.cs color hexes MUST equal the art-spec hexes exactly — colors only; typography, spacing, and radii are GameTheme-native (no art-spec source) and stay owned here. No art-spec (exploratory/prototype): pick a deliberate palette, flag it as unlocked, and reconcile when the spec lands.
For a runtime-constructed Unity UI (no prefabs/UXML to centralize), the token layer is a theme object (a GameTheme ScriptableObject) referenced by the runtime builder (AppRoot). Put all five token families there, named, and reference them everywhere:
- Typography scale — a small set of named sizes (NOT per-call literals). e.g.
Display=78, Title=56, Heading=44, Subhead=32, Body=30, Label=26, Caption=22. Add weight roles if the font has them. Every label picks a role, never a number. - Spacing scale — a stepped rhythm (
xs=4, s=8, m=16, l=24, xl=32, xxl=48) for padding/margins/gaps. Lay out from the scale so vertical rhythm is consistent across screens (USWDS units). - Color roles (semantic, not raw) — name by role not hue:
background,panel,textPrimary,textMuted,textOnColor,accent,danger/conflict,success. Region/decorative palettes stay separate. Semantic naming means a re-skin changes the role's value once and every widget follows (USWDS color, Spectrum 3 token levels: global → alias → component). - Corner radii —
radiusS / radiusM / radiusL / pill. One rounded-rect language across cards, buttons, chips. - Icon sizes —
iconS / iconM / iconL+ the 44pt minimum touch target (~88px @2x) as a named constant.
Express it as fields on the theme (the example game already does this for colors — extend it to sizes/spacing/radii):
Real-world example: the build leaked 16 distinct magic font-size literals (24/26/28/30/31/32/38/40/42/44/56/60/64/72/76/78) across AppRoot, LeaderboardView, and CubeApp — three separate Label(...) factories each taking a raw size. That is exactly the "the menu looks cheap / text drifts" churn. A typography token set + one shared Label collapses those to ~7 named roles. Self-heal note: keep the theme usable from CreateInstance (default field values = the real values) so a null/headless asset ref still renders — and delete any Resources/GameTheme.asset that would shadow the .cs defaults with stale serialized values (the .cs is the runtime source read by AppRoot — itself a derived view of art-spec.yaml, the only style SSOT, whose palette hexes it must equal exactly, colors only).
Shared component library — consistent by construction (atomic design)
Menus drift when each screen builds its widgets ad hoc. The fix is atomic design (Brad Frost): build from a small set of reusable components — atoms (Label, Icon, Button) compose into molecules (IconButton, Pill, Card) — so "a button looks the same on every page… modifying an atom updates every place that uses it" (LogRocket). In a runtime UI this is a set of factory functions, ONE per widget, all reading tokens from the theme:
Label(parent, text, TypeRole role, ColorRole color, align)— the only way text is created. No call site passes a raw size; it passes a role that maps to the typography token.Button(...),IconButton(...),Card(...),Pill(...),Toggle(...)— each applies the theme's radius/spacing/color-role/touch-min internally.
Rules that keep it consistent:
- One factory per widget, used by EVERY screen. No screen news up a raw
TextMeshProUGUI/Image/Buttonand styles it inline. Restyling glossy→flat or recoloring a button becomes a one-function edit instead of a hunt across screens (the example game restyled buttons glossy→flat repeatedly because the styling lived in N places). - Don't fork the factory per screen. The example game ended up with three
Labelimplementations (app/leaderboard/cube) → guaranteed drift. Put shared factories in ONE static UI-kit class that every builder calls. - Compose, don't copy. A Card is panel + radius + padding from tokens; an IconButton is Button + Icon + Label. Build molecules from atoms, not from scratch.
User-facing strings — single source of truth (no literal drift, enables CJK)
Every user-visible string is defined once and referenced, never duplicated as a literal across screens. Hard-coded strings are "expensive technical debt… every hard-coded string [is] a localization failure point" (SimpleLocalize); the i18n rule is externalize all user-facing strings, never concatenate (Microsoft Globalization).
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/unity-ui-designer/SKILL.md
Popularity
- Repository stars
- 3
- 7-day trend score
- 7
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/tea-x-random/unity-game-skills/unity-ui-designer)