unity-editor-imgui-design
БесплатноБез исполняемых скриптовНе проверенUnity IMGUI (Immediate Mode GUI) for editor tools and custom inspectors. Use for EditorWindow, Custom Inspector, Property Drawer development. NOT for game UI…
Об этом скилле
Unity Editor IMGUI Design Skill
WARNING: IMGUI is for Unity Editor extensions ONLY. For game UI, use
unity-game-ugui-designorunity-game-ui-toolkit-design.
IMGUI vs Game UI
| Aspect | IMGUI (Editor) | uGUI / UI Toolkit (Game) |
|---|---|---|
| Purpose | Editor tools, inspectors | In-game UI, HUD |
| Build inclusion | Editor only | Included in builds |
| Rendering | Immediate mode | Retained mode |
| Performance | OK for editor | Optimized for runtime |
| Styling | Limited (GUISkin) | Rich (USS, materials) |
Quick Start
Create EditorWindow
// Create editor window script
mcp__unity-mcp-server__create_class({
path: "Assets/Editor/MyToolWindow.cs",
className: "MyToolWindow",
namespace: "MyProject.Editor",
baseType: "EditorWindow",
usings: "UnityEditor"
})
// Add window content
mcp__unity-mcp-server__edit_structured({
path: "Assets/Editor/MyToolWindow.cs",
symbolName: "MyToolWindow",
operation: "insert_after",
newText: `
[MenuItem("Tools/My Tool Window")]
public static void ShowWindow()
{
GetWindow<MyToolWindow>("My Tool");
}
private void OnGUI()
{
GUILayout.Label("My Tool", EditorStyles.boldLabel);
if (GUILayout.Button("Do Something"))
{
Debug.Log("Button clicked!");
}
}
`
})
Create Custom Inspector
// Create custom inspector script
mcp__unity-mcp-server__create_class({
path: "Assets/Editor/MyComponentEditor.cs",
className: "MyComponentEditor",
namespace: "MyProject.Editor",
baseType: "Editor",
usings: "UnityEditor"
})
// Add CustomEditor attribute and OnInspectorGUI
mcp__unity-mcp-server__edit_structured({
path: "Assets/Editor/MyComponentEditor.cs",
symbolName: "MyComponentEditor",
operation: "insert_before",
newText: "[CustomEditor(typeof(MyComponent))]\n"
})
mcp__unity-mcp-server__edit_structured({
path: "Assets/Editor/MyComponentEditor.cs",
symbolName: "MyComponentEditor",
operation: "insert_after",
newText: `
public override void OnInspectorGUI()
{
serializedObject.Update();
EditorGUILayout.PropertyField(serializedObject.FindProperty("myField"));
if (GUILayout.Button("Custom Button"))
{
((MyComponent)target).DoSomething();
}
serializedObject.ApplyModifiedProperties();
}
`
})
Core Concepts
IMGUI Lifecycle
OnGUI() called every frame (or on repaint/input)
├── Layout Event: Calculate sizes
├── Repaint Event: Draw controls
└── Input Events: Handle mouse/keyboard
Event Types
void OnGUI()
{
Event e = Event.current;
switch (e.type)
{
case EventType.Layout:
// Calculate layout
break;
case EventType.Repaint:
// Draw visuals
break;
case EventType.MouseDown:
// Handle click
break;
case EventType.KeyDown:
// Handle keyboard
break;
}
}
GUILayout vs EditorGUILayout
| GUILayout | EditorGUILayout |
|---|---|
| Works everywhere | Editor only |
| Basic controls | Rich editor controls |
GUILayout.Button |
EditorGUILayout.PropertyField |
GUILayout.TextField |
EditorGUILayout.ObjectField |
GUILayout.Label |
EditorGUILayout.HelpBox |
EditorWindow Patterns
Basic Window Structure
using UnityEngine;
using UnityEditor;
public class MyToolWindow : EditorWindow
{
// Serialized state (survives recompile)
[SerializeField] private string searchText = "";
[SerializeField] private Vector2 scrollPosition;
// Non-serialized state
private GUIStyle headerStyle;
[MenuItem("Tools/My Tool %#t")] // Ctrl+Shift+T
public static void ShowWindow()
{
var window = GetWindow<MyToolWindow>();
window.titleContent = new GUIContent("My Tool", EditorGUIUtility.IconContent("d_Settings").image);
window.minSize = new Vector2(300, 200);
window.Show();
}
private void OnEnable()
{
// Initialize when window opens
}
private void OnDisable()
{
// Cleanup when window closes
}
private void OnGUI()
{
InitStyles();
DrawToolbar();
DrawContent();
}
private void InitStyles()
{
headerStyle ??= new GUIStyle(EditorStyles.boldLabel)
{
fontSize = 14,
alignment = TextAnchor.MiddleCenter
};
}
private void DrawToolbar()
{
using (new EditorGUILayout.HorizontalScope(EditorStyles.toolbar))
{
if (GUILayout.Button("Refresh", EditorStyles.toolbarButton, GUILayout.Width(60)))
{
Refresh();
}
GUILayout.FlexibleSpace();
searchText = EditorGUILayout.TextField(searchText, EditorStyles.toolbarSearchFi
Установить unity-editor-imgui-design в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
mcp__unity-mcp-server__create_classmcp__unity-mcp-server__edit_structuredmcp__unity-mcp-server__edit_snippetmcp__unity-mcp-server__readmcp__unity-mcp-server__searchmcp__unity-mcp-server__get_symbolsmcp__unity-mcp-server__find_symbolmcp__unity-mcp-server__manage_asset_databasemcp__unity-mcp-server__execute_menu_itemmcp__unity-mcp-server__get_compilation_stateFAQ
Что делает скилл unity-editor-imgui-design?
Unity IMGUI (Immediate Mode GUI) for editor tools and custom inspectors. Use for EditorWindow, Custom Inspector, Property Drawer development. NOT for game UI - use unity-game-ugui-design or unity-game-ui-toolkit-design instead.
Как установить скилл unity-editor-imgui-design?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл unity-editor-imgui-design запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic