keijiro/unity-skills/unity-ui-imgui
Claude Code and agent skill by keijiro/unity-skills
- community
Checking that the SKILL.md file is still in the repository.
Generates and modifies Unity IMGUI editor code such as EditorWindows, custom Inspectors, PropertyDrawers, and OnGUI scripts. Use for IMGUI or OnGUI or maintaining existing IMGUI code.
Install
npx vskill@latest install keijiro/unity-skills/unity-ui-imguiSKILL.md
Before proceeding: If the user is asking about creating a new editor window, custom inspector, or PropertyDrawer without explicitly mentioning IMGUI/OnGUI, recommend using UI Toolkit (CreateGUI) instead, as it's the modern approach. Only proceed with IMGUI if:
- User is modifying existing IMGUI code
- User explicitly requests IMGUI/immediate mode
- The project exclusively uses IMGUI for editor tools
When activated, read the reference files:
- references/templates.md — EditorWindow, Inspector, PropertyDrawer templates
- references/gui-elements.md — GUI elements, layout groups, styling
When to Use This Skill
IMPORTANT: This skill is for legacy IMGUI code only. Use this skill when:
- User is maintaining/updating existing IMGUI editor code (files with
OnGUI(),OnInspectorGUI()) - User explicitly requests IMGUI/immediate mode GUI
- Project exclusively uses IMGUI for all editor tools
Do NOT use this skill for:
- New editor windows (use UI Toolkit with
CreateGUI()instead) - New custom inspectors (use UI Toolkit instead)
- Requests that don't explicitly mention IMGUI or OnGUI
Legacy IMGUI is used for:
- Editor windows —
EditorWindowclasses withOnGUI() - Custom inspectors —
Editor,PropertyDrawerclasses withOnInspectorGUI() - Debug overlays —
OnGUI()in MonoBehaviour (runtime)
IMGUI is not for runtime game UI — use UI Toolkit or uGUI instead.
Scope
Generate only what is requested (for legacy IMGUI code):
| Request | Output | Note | |
|---|---|---|---|
| Editor window (IMGUI/OnGUI) | EditorWindow with OnGUI() | Only if explicitly IMGUI | |
| Custom inspector (IMGUI) | Editor with OnInspectorGUI() | Only if explicitly IMGUI | |
| Property drawer (IMGUI) | PropertyDrawer with OnGUI() | Only if explicitly IMGUI | |
| Debug overlay | MonoBehaviour with OnGUI() | Runtime debugging | |
| Update existing IMGUI script | Modify existing OnGUI code | Always appropriate |
Clarify if ambiguous:
- "inspector" → Custom Editor for a specific type, or PropertyDrawer? Also ask: Should this use UI Toolkit (modern) or IMGUI (legacy)?
- "editor window" → First ask: Should this use UI Toolkit (modern/CreateGUI) or IMGUI (legacy/OnGUI)?
- "tool window" → EditorWindow with what functionality? Which UI system?
Conventions
Follow project patterns first. Search existing editor scripts before applying defaults.
| Type | Convention | Good | Bad | |
|---|---|---|---|---|
| Script names | PascalCase | MyToolWindow.cs | my-tool-window.cs | |
| EditorWindow | [Name]Window.cs | LevelEditorWindow.cs | LevelEditor.cs | |
| Custom Editor | [Type]Editor.cs | EnemyEditor.cs | EnemyInspector.cs | |
| PropertyDrawer | [Type]Drawer.cs | RangeDrawer.cs | RangePropertyDrawer.cs | |
| Location | Editor folder | Assets/Editor/ | Assets/Scripts/ |
Editor folder is required — Scripts using UnityEditor namespace must be in an Editor folder or they will fail to build.
Workflow
- Analyze — Determine script type needed (EditorWindow, Editor, PropertyDrawer, etc.)
- Search — Find existing editor scripts to match patterns
- Follow project patterns — Match folder structure and naming
- Create script — Use appropriate base class and attributes
- Implement OnGUI — Build the interface with layout groups
Script Structure
EditorWindow
Custom Editor
PropertyDrawer
Key Rules
- Cache GUIStyle objects — never create new GUIStyle in OnGUI (causes memory allocation every frame)
- Use SerializedProperty — for proper undo/redo support in inspectors
- Call ApplyModifiedProperties() — after any serialized object changes
- Use EditorGUILayout — for editor scripts (auto-layout)
- Use GUILayout — for runtime OnGUI
- Begin/End pairs — always match BeginHorizontal with EndHorizontal, etc.
- Editor folder required — scripts fail to build if not in Editor folder
Layout Basics
Horizontal grouping:
Vertical grouping:
Scroll view:
Foldout section:
Common Patterns
Button with action:
Property field with label:
Object reference field:
Disabled group:
Best Practices
- Use
SerializedObjectandSerializedPropertyfor undo support - Cache property references in
OnEnable() - Use
EditorUtility.SetDirty()only for non-serialized changes - Use
Undo.RecordObject()before modifying objects directly - Use
EditorStylesfor consistent appearance - Use
GUILayout.FlexibleSpace()to push elements apart
See references/templates.md for complete script templates. See references/gui-elements.md for full element reference.
Security
- Security scanPassed, 90 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-imgui/SKILL.md
Popularity
- 7-day trend score
- 0
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/keijiro/unity-skills/unity-ui-imgui)