# ui-imgui

Writes and edits legacy IMGUI code in Unity: EditorWindow classes, custom inspectors, PropertyDrawers and OnGUI scripts for the editor.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 4500 installs · ★ 1149
- Author: Unity-Technologies
- License: LicenseRef-Unknown · policy=link-only · description only; the file stays with the author
- Source: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/ui-imgui/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/ui-imgui

## What it does

The skill kicks in for existing IMGUI editor code or when you ask for immediate mode outright. Ask for a new editor window or inspector without naming OnGUI and it will point you to UI Toolkit with `CreateGUI()` instead of writing IMGUI. That is by design: IMGUI is treated as the legacy path here.

Once active, it loads two reference files. `references/templates.md` holds the starting templates for EditorWindow, Inspector and PropertyDrawer; `references/gui-elements.md` covers GUI elements, layout groups and styling. Expect guidance that follows the usual IMGUI discipline: cache `GUIStyle` objects rather than build them inside `OnGUI`, drive inspectors with `SerializedProperty` plus `ApplyModifiedProperties()`, keep every `BeginHorizontal` matched by an `EndHorizontal`. Any script touching the `UnityEditor` namespace has to sit in an `Editor` folder, or the build breaks.

Before writing, the skill searches your project for existing editor scripts and copies their naming and folder layout. Projects with their own conventions get code that fits rather than a generic template.

## Requirements
- Works with: Unity

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill ui-imgui -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/ui-imgui/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/ui-imgui/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill ui-imgui -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/ui-imgui/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill ui-imgui -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/ui-imgui/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install Unity-Technologies/skills ui-imgui
```

2. **Manually: put the files in place**
- File: `.github/skills/ui-imgui/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill ui-imgui -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/Unity-Technologies/skills --path skills/ui-imgui
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/ui-imgui/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add Unity-Technologies/skills --skill ui-imgui -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/Unity-Technologies/skills/tree/HEAD/skills/ui-imgui/SKILL.md

## When to use it
- extend an existing editor window with `OnGUI()`
- build a custom inspector that supports undo
- write a PropertyDrawer for a type or attribute
- clean up layout groups in an older tool window
- debug with an OnGUI overlay at runtime

## Example prompts
- Add a settings tab to `LevelEditorWindow.cs` using `EditorGUILayout`
- Write an IMGUI inspector for the `Enemy` component and bind fields through `SerializedProperty`
- Find where `OnGUI()` allocates a new `GUIStyle` each frame and remove it

## Similar
- [orbit-card](https://affpapa.org/en/nevibecode/skills/orbit-card.md) — skill · 10000 installs
- [cad](https://affpapa.org/en/nevibecode/skills/cad.md) — skill · 14000 installs
- [step-parts](https://affpapa.org/en/nevibecode/skills/step-parts.md) — skill · 11200 installs
- [sdf](https://affpapa.org/en/nevibecode/skills/sdf.md) — skill · 10500 installs
- [urdf](https://affpapa.org/en/nevibecode/skills/urdf.md) — skill · 10500 installs
- [hatch-pet](https://affpapa.org/en/nevibecode/skills/hatch-pet.md) — skill · 3300 installs

From the same set: [unity-technologies/skills](https://affpapa.org/en/nevibecode/by/unity-technologies/skills.md) — 31 cards

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
