Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
中文简介正在准备中。当前显示原文说明。
Unity IMGUI (Immediate Mode GUI) expert for legacy editor tools using OnGUI/immediate mode. Generates and modifies IMGUI EditorWindows, custom Inspectors, PropertyDrawers, and scripts with IMGUI code (OnGUI, OnInspectorGUI). Use when maintaining existing IMGUI editor code or when user explicitly requests IMGUI/OnGUI.
中文简介正在准备中。当前显示原文说明。
实测评分 未实测
查看安装方法安装前可以查看交给 AI 代理的指令内容。
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:
When activated, read the reference files:
IMPORTANT: This skill is for legacy IMGUI code only. Use this skill when:
OnGUI(), OnInspectorGUI())Do NOT use this skill for:
CreateGUI() instead)Legacy IMGUI is used for:
EditorWindow classes with OnGUI()Editor, PropertyDrawer classes with OnInspectorGUI()OnGUI() in MonoBehaviour (runtime)IMGUI is not for runtime game UI — use UI Toolkit or uGUI instead.
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:
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.
[MenuItem attribute] → adds to menu
ShowWindow() static method → opens window
OnGUI() → draws interface
OnEnable/OnDisable → initialization/cleanup
[CustomEditor attribute] → targets component type
OnInspectorGUI() → draws inspector
OnEnable() → cache SerializedProperties
serializedObject.Update/ApplyModifiedProperties → undo support
[CustomPropertyDrawer attribute] → targets type or attribute
OnGUI(Rect, SerializedProperty, GUIContent) → draws property
GetPropertyHeight() → custom height if needed
Horizontal grouping:
EditorGUILayout.BeginHorizontal();
// elements appear side by side
EditorGUILayout.EndHorizontal();
Vertical grouping:
EditorGUILayout.BeginVertical("box");
// elements appear stacked, with box style
EditorGUILayout.EndVertical();
Scroll view:
scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
// scrollable content
EditorGUILayout.EndScrollView();
Foldout section:
showSection = EditorGUILayout.Foldout(showSection, "Section Name");
if (showSection)
{
EditorGUI.indentLevel++;
// section content
EditorGUI.indentLevel--;
}
Button with action:
if (GUILayout.Button("Do Something"))
{
// action here
}
Property field with label:
EditorGUILayout.PropertyField(myProperty, new GUIContent("Label"));
Object reference field:
myObject = (MyType)EditorGUILayout.ObjectField("Label", myObject, typeof(MyType), true);
Disabled group:
EditorGUI.BeginDisabledGroup(condition);
// disabled elements
EditorGUI.EndDisabledGroup();
SerializedObject and SerializedProperty for undo supportOnEnable()EditorUtility.SetDirty() only for non-serialized changesUndo.RecordObject() before modifying objects directlyEditorStyles for consistent appearanceGUILayout.FlexibleSpace() to push elements apartSee references/templates.md for complete script templates.
See references/gui-elements.md for full element reference.
还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Refactor bloated AGENTS.md, CLAUDE.md, or similar agent instruction files to follow progressive disclosure principles. Splits monolithic files into organized, linked documentation.
中文简介正在准备中。当前显示原文说明。
Build and operate a live game using Unity Services. Use when the user needs to implement, connect, or debug backend-driven features — battle passes, achievements, player progression, cloud saves, leaderboards, matchmaking, virtual economies, server-authoritative logic, anti-cheat, player accounts and authentication, remote configuration, feature flags, A/B testing, analytics, or cloud resource deployment. Triggers on live-ops, live service, backend, server authority, cloud code, cloud save, remote config, player data, retention, monetization loop, season pass, ranking, multiplayer sessions, lobbies, or any Unity Services integration.
中文简介正在准备中。当前显示原文说明。
Kern engine critical invariants: coordinate system, UI Toolkit positioning, RenderTexture blit, LifetimeScope/scene structure, VolumeProfile editor API, camera pixel-grid alignment, performance analysis rules, profiler interpretation, and the no-fallback policy. Use when touching coordinates, WorldToScreen, UI element anchoring, RenderTexture, LifetimeScope, VolumeProfile, camera, FPS analysis, Profiler markers, or any code near an "invariant" comment. Triggers on: CoordinateUtils, MapManager.WorldHeight, RuntimePanelUtils, CameraTransformWorldToPanel, WorldToLocal, PositionWriteEpsilon, CameraPixelGridAligner, LifetimeScope, RegisterComponent, VolumeProfile, AssetDatabase.AddObjectToAsset, EditorLoop, VSync, fallback, paper white, FPS, frame time.
中文简介正在准备中。当前显示原文说明。
Kern project C# conventions, namespace rules, DI/VContainer patterns, and assembly layer boundaries. Use when writing, editing, or reviewing any C# file — MonoBehaviours, ScriptableObjects, services, contracts, factories, or editor scripts. Triggers on: namespace, nullable, asmdef, VContainer, RegisterComponent, IObjectResolver, composition root, Kern.Contracts, primary constructor, record struct, SA1513, _camelCase, PascalCase, asmref, MonoScript.GetClass.
中文简介正在准备中。当前显示原文说明。
Synchronize and compile FMOD Studio banks into StreamingAssets
中文简介正在准备中。当前显示原文说明。
Kern HDR/color pipeline contract: scene-referred linear working space, paper white units, radiance format rules, URP output transform ownership, DisplayFinal perceptual/linear space, UI brightness, HDR calibration screen, safe-start HDR switch, and HDROutputController usage. Use when touching lighting shaders, glow, bloom, tonemapping, post-processing, color grading, LUT, display output, UI colors, calibration, or any code with DisplaySettings / HDROutput / PaperWhite / Tonemapping / CompositeFinal / DisplayFinal / VisualTuning. Triggers on: saturate on radiance, clamp color, sRGB in shader, UNorm light buffer, ARGBHalf, paper white, HDROutputReconciler, VisualTuning, BT2390, detectPaperWhite, HDRCalibrationScreen, HDRSwitchPending, HDROutputSettings.
中文简介正在准备中。当前显示原文说明。