nccgs 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (278) hide show
  1. package/.claude/agents/nccgs-accessibility-specialist.md +26 -0
  2. package/.claude/agents/nccgs-adversarial-reviewer.md +26 -0
  3. package/.claude/agents/nccgs-ai-programmer.md +26 -0
  4. package/.claude/agents/nccgs-analytics-engineer.md +26 -0
  5. package/.claude/agents/nccgs-art-direction-lead.md +26 -0
  6. package/.claude/agents/nccgs-audio-direction-lead.md +26 -0
  7. package/.claude/agents/nccgs-creative-director.md +26 -0
  8. package/.claude/agents/nccgs-documentation-manager.md +26 -0
  9. package/.claude/agents/nccgs-economy-designer.md +26 -0
  10. package/.claude/agents/nccgs-engine-programmer.md +26 -0
  11. package/.claude/agents/nccgs-game-design-lead.md +26 -0
  12. package/.claude/agents/nccgs-game-designer.md +26 -0
  13. package/.claude/agents/nccgs-gameplay-programmer.md +26 -0
  14. package/.claude/agents/nccgs-level-designer.md +26 -0
  15. package/.claude/agents/nccgs-live-ops-designer.md +26 -0
  16. package/.claude/agents/nccgs-localization-lead.md +26 -0
  17. package/.claude/agents/nccgs-narrative-lead.md +26 -0
  18. package/.claude/agents/nccgs-network-programmer.md +26 -0
  19. package/.claude/agents/nccgs-performance-analyst.md +26 -0
  20. package/.claude/agents/nccgs-producer.md +26 -0
  21. package/.claude/agents/nccgs-production-coordinator.md +23 -0
  22. package/.claude/agents/nccgs-programming-lead.md +26 -0
  23. package/.claude/agents/nccgs-prototyper.md +26 -0
  24. package/.claude/agents/nccgs-qa-engineer.md +26 -0
  25. package/.claude/agents/nccgs-qa-lead.md +26 -0
  26. package/.claude/agents/nccgs-release-engineer.md +26 -0
  27. package/.claude/agents/nccgs-release-lead.md +26 -0
  28. package/.claude/agents/nccgs-security-engineer.md +26 -0
  29. package/.claude/agents/nccgs-sound-designer.md +26 -0
  30. package/.claude/agents/nccgs-systems-designer.md +26 -0
  31. package/.claude/agents/nccgs-technical-architect.md +26 -0
  32. package/.claude/agents/nccgs-technical-artist.md +26 -0
  33. package/.claude/agents/nccgs-technical-director.md +26 -0
  34. package/.claude/agents/nccgs-tools-programmer.md +26 -0
  35. package/.claude/agents/nccgs-ui-programmer.md +26 -0
  36. package/.claude/agents/nccgs-unity-build-specialist.md +26 -0
  37. package/.claude/agents/nccgs-unity-content-specialist.md +26 -0
  38. package/.claude/agents/nccgs-unity-implementer.md +26 -0
  39. package/.claude/agents/nccgs-unity-rendering-specialist.md +26 -0
  40. package/.claude/agents/nccgs-unity-systems-specialist.md +26 -0
  41. package/.claude/agents/nccgs-unity-ui-specialist.md +26 -0
  42. package/.claude/agents/nccgs-ux-designer.md +26 -0
  43. package/.claude/agents/nccgs-verification-engineer.md +26 -0
  44. package/.claude/agents/nccgs-world-builder.md +26 -0
  45. package/.claude/agents/nccgs-writer.md +26 -0
  46. package/.claude/nccgs/THIRD_PARTY_NOTICES.md +13 -0
  47. package/.claude/nccgs/VERSION +1 -0
  48. package/.claude/nccgs/constitution.md +131 -0
  49. package/.claude/nccgs/hooks/agent-audit.mjs +10 -0
  50. package/.claude/nccgs/hooks/common.mjs +41 -0
  51. package/.claude/nccgs/hooks/post-compact.mjs +1 -0
  52. package/.claude/nccgs/hooks/pre-compact.mjs +8 -0
  53. package/.claude/nccgs/hooks/protect-git.mjs +22 -0
  54. package/.claude/nccgs/hooks/protect-write.mjs +17 -0
  55. package/.claude/nccgs/hooks/session-start.mjs +15 -0
  56. package/.claude/nccgs/hooks/session-stop.mjs +7 -0
  57. package/.claude/nccgs/protocols/agent-contract.md +34 -0
  58. package/.claude/nccgs/protocols/context-packets.md +13 -0
  59. package/.claude/nccgs/protocols/evidence.md +15 -0
  60. package/.claude/nccgs/protocols/model-routing.md +22 -0
  61. package/.claude/nccgs/protocols/orchestration.md +26 -0
  62. package/.claude/nccgs/protocols/unity-boundary.md +11 -0
  63. package/.claude/nccgs/settings.fragment.json +77 -0
  64. package/.claude/nccgs/studio.json +347 -0
  65. package/.claude/nccgs/tools/configure-models.mjs +39 -0
  66. package/.claude/nccgs/unity-skills-manifest.json +727 -0
  67. package/.claude/nccgs/workflow-catalog.json +317 -0
  68. package/.claude/rules/nccgs-canonical-docs.md +19 -0
  69. package/.claude/rules/nccgs-editor-tools.md +12 -0
  70. package/.claude/rules/nccgs-localization.md +12 -0
  71. package/.claude/rules/nccgs-networking.md +13 -0
  72. package/.claude/rules/nccgs-performance.md +14 -0
  73. package/.claude/rules/nccgs-rendering.md +16 -0
  74. package/.claude/rules/nccgs-security.md +13 -0
  75. package/.claude/rules/nccgs-tests.md +18 -0
  76. package/.claude/rules/nccgs-ui.md +14 -0
  77. package/.claude/rules/nccgs-unity-assets.md +21 -0
  78. package/.claude/rules/nccgs-unity-code.md +22 -0
  79. package/.claude/skills/accessibility-review/SKILL.md +14 -0
  80. package/.claude/skills/architecture-decision/SKILL.md +14 -0
  81. package/.claude/skills/asset-audit/SKILL.md +14 -0
  82. package/.claude/skills/audit/SKILL.md +16 -0
  83. package/.claude/skills/audit/references/dimensions.md +46 -0
  84. package/.claude/skills/balance-review/SKILL.md +14 -0
  85. package/.claude/skills/bug-triage/SKILL.md +14 -0
  86. package/.claude/skills/build-live-game/SKILL.md +317 -0
  87. package/.claude/skills/build-live-game/references/achievements.md +779 -0
  88. package/.claude/skills/build-live-game/references/apis.md +280 -0
  89. package/.claude/skills/build-live-game/references/authentication.md +437 -0
  90. package/.claude/skills/build-live-game/references/battlepass.md +860 -0
  91. package/.claude/skills/build-live-game/references/cloud-code.md +563 -0
  92. package/.claude/skills/build-live-game/references/cloud-save.md +474 -0
  93. package/.claude/skills/build-live-game/references/deployment.md +216 -0
  94. package/.claude/skills/build-live-game/references/player-account.md +813 -0
  95. package/.claude/skills/build-live-game/references/remote-config.md +96 -0
  96. package/.claude/skills/build-live-game/references/tooling.md +431 -0
  97. package/.claude/skills/closure/SKILL.md +14 -0
  98. package/.claude/skills/code-review/SKILL.md +14 -0
  99. package/.claude/skills/compatibility-review/SKILL.md +14 -0
  100. package/.claude/skills/context-pack/SKILL.md +14 -0
  101. package/.claude/skills/dependency-review/SKILL.md +14 -0
  102. package/.claude/skills/design/SKILL.md +20 -0
  103. package/.claude/skills/design-review/SKILL.md +14 -0
  104. package/.claude/skills/evidence-review/SKILL.md +14 -0
  105. package/.claude/skills/hotfix/SKILL.md +14 -0
  106. package/.claude/skills/implement-in-app-purchases/README.md +233 -0
  107. package/.claude/skills/implement-in-app-purchases/SKILL.md +158 -0
  108. package/.claude/skills/implement-in-app-purchases/references/api-notes.md +562 -0
  109. package/.claude/skills/implement-in-app-purchases/references/codeless-catalog.md +331 -0
  110. package/.claude/skills/implement-in-app-purchases/references/convert-adapty.md +268 -0
  111. package/.claude/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
  112. package/.claude/skills/implement-in-app-purchases/references/convert-revenuecat.md +275 -0
  113. package/.claude/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
  114. package/.claude/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +204 -0
  115. package/.claude/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +198 -0
  116. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +356 -0
  117. package/.claude/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +446 -0
  118. package/.claude/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +680 -0
  119. package/.claude/skills/implement-in-app-purchases/references/platform-notes.md +204 -0
  120. package/.claude/skills/implement-in-app-purchases/references/pre-check.md +205 -0
  121. package/.claude/skills/incident-recovery/SKILL.md +14 -0
  122. package/.claude/skills/initialize-ai-navigation/SKILL.md +95 -0
  123. package/.claude/skills/initialize-ai-navigation/references/navigation-system.md +794 -0
  124. package/.claude/skills/levelplay-unity-integration/CHANGELOG.md +57 -0
  125. package/.claude/skills/levelplay-unity-integration/README.md +74 -0
  126. package/.claude/skills/levelplay-unity-integration/SKILL.md +1126 -0
  127. package/.claude/skills/levelplay-unity-integration/references/banner-api.md +920 -0
  128. package/.claude/skills/levelplay-unity-integration/references/best-practices.md +536 -0
  129. package/.claude/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
  130. package/.claude/skills/levelplay-unity-integration/references/initialization-api.md +630 -0
  131. package/.claude/skills/levelplay-unity-integration/references/interstitial-api.md +899 -0
  132. package/.claude/skills/levelplay-unity-integration/references/ios-setup.md +491 -0
  133. package/.claude/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
  134. package/.claude/skills/levelplay-unity-integration/references/privacy-settings.md +608 -0
  135. package/.claude/skills/levelplay-unity-integration/references/rewarded-api.md +902 -0
  136. package/.claude/skills/localization/SKILL.md +135 -0
  137. package/.claude/skills/localization/references/api-notes.md +76 -0
  138. package/.claude/skills/localization/resources/L10nBatchProcessor.cs +69 -0
  139. package/.claude/skills/localization/resources/LocalizedFontAsset.cs +18 -0
  140. package/.claude/skills/localize-game/SKILL.md +14 -0
  141. package/.claude/skills/migrate-project/SKILL.md +21 -0
  142. package/.claude/skills/migrate-project/references/procedure.md +63 -0
  143. package/.claude/skills/milestone-review/SKILL.md +14 -0
  144. package/.claude/skills/new-unity-project/SKILL.md +179 -0
  145. package/.claude/skills/optimize-audio/SKILL.md +199 -0
  146. package/.claude/skills/optimize-audio/resources/audio-import-api.md +146 -0
  147. package/.claude/skills/optimize-audio/resources/platform-settings.md +48 -0
  148. package/.claude/skills/optimize-text-mesh-pro/SKILL.md +182 -0
  149. package/.claude/skills/optimize-web/SKILL.md +393 -0
  150. package/.claude/skills/optimize-web/resources/WebOptimizer.cs +21 -0
  151. package/.claude/skills/optimize-web/resources/toktx-examples.sh +11 -0
  152. package/.claude/skills/performance-audit/SKILL.md +14 -0
  153. package/.claude/skills/physics-3d-collision/SKILL.md +442 -0
  154. package/.claude/skills/physics-3d-collision/references/troubleshooting.md +41 -0
  155. package/.claude/skills/physics-3d-collision/resources/CollisionDebugger.cs +33 -0
  156. package/.claude/skills/plan-feature/SKILL.md +14 -0
  157. package/.claude/skills/playtest/SKILL.md +14 -0
  158. package/.claude/skills/project-stage/SKILL.md +14 -0
  159. package/.claude/skills/prototype-feature/SKILL.md +14 -0
  160. package/.claude/skills/qa-plan/SKILL.md +14 -0
  161. package/.claude/skills/release/SKILL.md +18 -0
  162. package/.claude/skills/release-readiness/SKILL.md +14 -0
  163. package/.claude/skills/retrospective/SKILL.md +14 -0
  164. package/.claude/skills/review/SKILL.md +16 -0
  165. package/.claude/skills/security-audit/SKILL.md +14 -0
  166. package/.claude/skills/setup-multiplayer-services/SKILL.md +39 -0
  167. package/.claude/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
  168. package/.claude/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
  169. package/.claude/skills/setup-multiplayer-services/references/examples.md +33 -0
  170. package/.claude/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
  171. package/.claude/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
  172. package/.claude/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
  173. package/.claude/skills/setup-vivox-voice-chat/SKILL.md +118 -0
  174. package/.claude/skills/setup-vivox-voice-chat/evals/.env.example +6 -0
  175. package/.claude/skills/setup-vivox-voice-chat/evals/README.md +101 -0
  176. package/.claude/skills/setup-vivox-voice-chat/evals/promptfooconfig.yaml +32 -0
  177. package/.claude/skills/setup-vivox-voice-chat/evals/tests/init-and-login.yaml +76 -0
  178. package/.claude/skills/setup-vivox-voice-chat/evals/tests/text-chat.yaml +65 -0
  179. package/.claude/skills/setup-vivox-voice-chat/evals/tests/voice-channels.yaml +74 -0
  180. package/.claude/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
  181. package/.claude/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
  182. package/.claude/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
  183. package/.claude/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
  184. package/.claude/skills/setup-vivox-voice-chat/references/voice-channels.md +90 -0
  185. package/.claude/skills/shader-graph-create-custom-node/SKILL.md +25 -0
  186. package/.claude/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
  187. package/.claude/skills/sprint-plan/SKILL.md +14 -0
  188. package/.claude/skills/sprite-editor/SKILL.md +66 -0
  189. package/.claude/skills/sprite-editor/references/api_reference.md +151 -0
  190. package/.claude/skills/sprite-editor/references/background.md +112 -0
  191. package/.claude/skills/sprite-editor/references/templates.md +72 -0
  192. package/.claude/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
  193. package/.claude/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
  194. package/.claude/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
  195. package/.claude/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
  196. package/.claude/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
  197. package/.claude/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
  198. package/.claude/skills/sprite-editor/scripts/README.md +134 -0
  199. package/.claude/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
  200. package/.claude/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
  201. package/.claude/skills/status/SKILL.md +16 -0
  202. package/.claude/skills/story-readiness/SKILL.md +14 -0
  203. package/.claude/skills/test/SKILL.md +16 -0
  204. package/.claude/skills/ui/SKILL.md +142 -0
  205. package/.claude/skills/ui-imgui/SKILL.md +186 -0
  206. package/.claude/skills/ui-imgui/references/gui-elements.md +156 -0
  207. package/.claude/skills/ui-imgui/references/templates.md +141 -0
  208. package/.claude/skills/ui-review/SKILL.md +14 -0
  209. package/.claude/skills/ui-ugui/SKILL.md +282 -0
  210. package/.claude/skills/ui-ugui/references/scrollview-setup.md +29 -0
  211. package/.claude/skills/ui-uitk/SKILL.md +235 -0
  212. package/.claude/skills/ui-uitk/references/common-issues.md +74 -0
  213. package/.claude/skills/ui-uitk/references/custom-elements.md +241 -0
  214. package/.claude/skills/ui-uitk/references/painter2d.md +282 -0
  215. package/.claude/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
  216. package/.claude/skills/ui-uitk/references/svg-icons.md +136 -0
  217. package/.claude/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
  218. package/.claude/skills/ui-uitk/references/uss-guide.md +138 -0
  219. package/.claude/skills/unity-cli/CHANGELOG.md +233 -0
  220. package/.claude/skills/unity-cli/SECURITY.md +22 -0
  221. package/.claude/skills/unity-cli/SKILL.md +414 -0
  222. package/.claude/skills/unity-cli/references/auth-license-cloud.md +146 -0
  223. package/.claude/skills/unity-cli/references/build-run-test.md +349 -0
  224. package/.claude/skills/unity-cli/references/collaboration.md +472 -0
  225. package/.claude/skills/unity-cli/references/config-hub.md +103 -0
  226. package/.claude/skills/unity-cli/references/diagnostics-maintenance.md +326 -0
  227. package/.claude/skills/unity-cli/references/editors-install.md +327 -0
  228. package/.claude/skills/unity-cli/references/integration-advanced.md +472 -0
  229. package/.claude/skills/unity-cli/references/projects-templates.md +574 -0
  230. package/.claude/skills/unity-package-management/SKILL.md +304 -0
  231. package/.claude/skills/unity-package-management/references/select-packages.md +108 -0
  232. package/.claude/skills/urp-postprocessing/SKILL.md +188 -0
  233. package/.claude/skills/urp-postprocessing/references/code-templates.md +119 -0
  234. package/.claude/skills/urp-postprocessing/references/effect-reference.md +86 -0
  235. package/.claude/skills/validate-urp-render-graph-renderer-feature/SKILL.md +269 -0
  236. package/.claude/skills/work/SKILL.md +36 -0
  237. package/.claude/skills/work/references/classification.md +41 -0
  238. package/.claude/skills/work/references/closure.md +50 -0
  239. package/.claude/skills/work/references/feature-contracts.md +32 -0
  240. package/.claude/skills/work/references/verification.md +26 -0
  241. package/CLAUDE.md +6 -0
  242. package/LICENSE +21 -0
  243. package/README.md +162 -0
  244. package/THIRD_PARTY_NOTICES.md +23 -0
  245. package/UPGRADING.md +32 -0
  246. package/VERSION +1 -0
  247. package/docs/ARCHITECTURE.md +73 -0
  248. package/docs/HUONG-DAN-MIGRATE-VA-SU-DUNG.md +324 -0
  249. package/docs/MIGRATION-MATRIX.md +23 -0
  250. package/docs/PROJECT-POLICY.md +67 -0
  251. package/docs/WORKFLOWS.md +61 -0
  252. package/package-assets/setup-vivox-voice-chat-evals.gitignore +7 -0
  253. package/package.json +41 -0
  254. package/scaffold/.nccgs/bugs/.gitkeep +1 -0
  255. package/scaffold/.nccgs/closures/.gitkeep +1 -0
  256. package/scaffold/.nccgs/context/.gitkeep +1 -0
  257. package/scaffold/.nccgs/decisions/.gitkeep +1 -0
  258. package/scaffold/.nccgs/evidence/.gitkeep +1 -0
  259. package/scaffold/.nccgs/features/.gitkeep +1 -0
  260. package/scaffold/.nccgs/migrations/.gitkeep +1 -0
  261. package/scaffold/.nccgs/playtests/.gitkeep +1 -0
  262. package/scaffold/.nccgs/project.yaml +103 -0
  263. package/scaffold/.nccgs/requirements.yaml +10 -0
  264. package/scaffold/.nccgs/reviews/.gitkeep +1 -0
  265. package/scaffold/.nccgs/state.md +40 -0
  266. package/scaffold/.nccgs/templates/agent-handoff.md +25 -0
  267. package/scaffold/.nccgs/templates/architecture-decision.md +27 -0
  268. package/scaffold/.nccgs/templates/closure-record.md +51 -0
  269. package/scaffold/.nccgs/templates/context-packet.yaml +17 -0
  270. package/scaffold/.nccgs/templates/evidence-record.md +23 -0
  271. package/scaffold/.nccgs/templates/feature-contract.md +35 -0
  272. package/scaffold/.nccgs/templates/migration-plan.md +40 -0
  273. package/scaffold/.nccgs/templates/waiver.md +11 -0
  274. package/scripts/cli.mjs +56 -0
  275. package/scripts/install.mjs +267 -0
  276. package/scripts/sync-unity-skills.mjs +126 -0
  277. package/scripts/validate.mjs +205 -0
  278. package/tests/framework.test.mjs +121 -0
@@ -0,0 +1,156 @@
1
+ # IMGUI Elements and Layout
2
+
3
+ ## Common GUI Elements
4
+
5
+ | Method | Use Case |
6
+ |--------|----------|
7
+ | `GUILayout.Label()` | Text display |
8
+ | `GUILayout.Button()` | Clickable button |
9
+ | `GUILayout.TextField()` | Text input |
10
+ | `GUILayout.TextArea()` | Multi-line text input |
11
+ | `GUILayout.Toggle()` | Checkbox |
12
+ | `GUILayout.Slider()` | Value slider |
13
+ | `GUILayout.SelectionGrid()` | Button grid selection |
14
+ | `GUILayout.Toolbar()` | Toolbar buttons |
15
+
16
+ ## Editor-Specific Elements
17
+
18
+ | Method | Use Case |
19
+ |--------|----------|
20
+ | `EditorGUILayout.PropertyField()` | Serialized property (auto) |
21
+ | `EditorGUILayout.ObjectField()` | Object reference |
22
+ | `EditorGUILayout.IntField()` | Integer input |
23
+ | `EditorGUILayout.FloatField()` | Float input |
24
+ | `EditorGUILayout.Vector3Field()` | Vector3 input |
25
+ | `EditorGUILayout.ColorField()` | Color picker |
26
+ | `EditorGUILayout.CurveField()` | Animation curve |
27
+ | `EditorGUILayout.EnumPopup()` | Enum dropdown |
28
+ | `EditorGUILayout.Popup()` | String dropdown |
29
+ | `EditorGUILayout.Foldout()` | Collapsible section |
30
+ | `EditorGUILayout.HelpBox()` | Info/warning/error box |
31
+
32
+ ## Layout Groups
33
+
34
+ ```csharp
35
+ // Horizontal
36
+ GUILayout.BeginHorizontal();
37
+ GUILayout.Button("Left");
38
+ GUILayout.Button("Right");
39
+ GUILayout.EndHorizontal();
40
+
41
+ // Vertical
42
+ GUILayout.BeginVertical();
43
+ GUILayout.Button("Top");
44
+ GUILayout.Button("Bottom");
45
+ GUILayout.EndVertical();
46
+
47
+ // Scroll View
48
+ scrollPos = GUILayout.BeginScrollView(scrollPos);
49
+ // ... content
50
+ GUILayout.EndScrollView();
51
+
52
+ // Area (absolute positioning)
53
+ GUILayout.BeginArea(new Rect(10, 10, 200, 100));
54
+ // ... content
55
+ GUILayout.EndArea();
56
+ ```
57
+
58
+ ## Editor Layout Groups
59
+
60
+ ```csharp
61
+ // Foldout section
62
+ showSection = EditorGUILayout.Foldout(showSection, "Section");
63
+ if (showSection)
64
+ {
65
+ EditorGUI.indentLevel++;
66
+ // ... content
67
+ EditorGUI.indentLevel--;
68
+ }
69
+
70
+ // Horizontal with flex space
71
+ EditorGUILayout.BeginHorizontal();
72
+ GUILayout.Label("Label");
73
+ GUILayout.FlexibleSpace();
74
+ GUILayout.Button("Action");
75
+ EditorGUILayout.EndHorizontal();
76
+
77
+ // Box group
78
+ EditorGUILayout.BeginVertical("box");
79
+ // ... content
80
+ EditorGUILayout.EndVertical();
81
+ ```
82
+
83
+ ## Layout Options
84
+
85
+ ```csharp
86
+ // Fixed width
87
+ GUILayout.Button("Wide", GUILayout.Width(200));
88
+
89
+ // Fixed height
90
+ GUILayout.Button("Tall", GUILayout.Height(50));
91
+
92
+ // Min/Max
93
+ GUILayout.Button("Flex", GUILayout.MinWidth(100), GUILayout.MaxWidth(300));
94
+
95
+ // Expand
96
+ GUILayout.Button("Fill", GUILayout.ExpandWidth(true));
97
+ ```
98
+
99
+ ## Styling
100
+
101
+ ```csharp
102
+ // Built-in styles
103
+ GUILayout.Label("Bold", EditorStyles.boldLabel);
104
+ GUILayout.Label("Large", EditorStyles.largeLabel);
105
+ GUILayout.Label("Mini", EditorStyles.miniLabel);
106
+ GUILayout.Label("Centered", EditorStyles.centeredGreyMiniLabel);
107
+
108
+ // Custom style (cache this, don't create in OnGUI)
109
+ private GUIStyle _headerStyle;
110
+ private GUIStyle HeaderStyle => _headerStyle ??= new GUIStyle(EditorStyles.boldLabel)
111
+ {
112
+ fontSize = 16,
113
+ alignment = TextAnchor.MiddleCenter
114
+ };
115
+ ```
116
+
117
+ ## Spacing and Separators
118
+
119
+ ```csharp
120
+ // Fixed space
121
+ GUILayout.Space(10);
122
+
123
+ // Flexible space (pushes elements apart)
124
+ GUILayout.FlexibleSpace();
125
+
126
+ // Horizontal line
127
+ EditorGUILayout.LabelField("", GUI.skin.horizontalSlider);
128
+
129
+ // Editor separator
130
+ EditorGUILayout.Separator();
131
+ ```
132
+
133
+ ## Disabled Groups
134
+
135
+ ```csharp
136
+ EditorGUI.BeginDisabledGroup(someCondition);
137
+ // ... disabled elements
138
+ EditorGUI.EndDisabledGroup();
139
+
140
+ // Or with using
141
+ using (new EditorGUI.DisabledGroupScope(someCondition))
142
+ {
143
+ // ... disabled elements
144
+ }
145
+ ```
146
+
147
+ ## Change Check
148
+
149
+ ```csharp
150
+ EditorGUI.BeginChangeCheck();
151
+ value = EditorGUILayout.IntField("Value", value);
152
+ if (EditorGUI.EndChangeCheck())
153
+ {
154
+ // Value changed, do something
155
+ }
156
+ ```
@@ -0,0 +1,141 @@
1
+ # IMGUI Templates
2
+
3
+ ## EditorWindow
4
+
5
+ ```csharp
6
+ using UnityEditor;
7
+ using UnityEngine;
8
+
9
+ public class MyToolWindow : EditorWindow
10
+ {
11
+ [MenuItem("Tools/My Tool")]
12
+ public static void ShowWindow()
13
+ {
14
+ GetWindow<MyToolWindow>("My Tool");
15
+ }
16
+
17
+ private void OnGUI()
18
+ {
19
+ GUILayout.Label("My Tool", EditorStyles.boldLabel);
20
+
21
+ // Your GUI here
22
+ }
23
+ }
24
+ ```
25
+
26
+ ## Custom Inspector
27
+
28
+ ```csharp
29
+ using UnityEditor;
30
+ using UnityEngine;
31
+
32
+ [CustomEditor(typeof(MyComponent))]
33
+ public class MyComponentEditor : Editor
34
+ {
35
+ public override void OnInspectorGUI()
36
+ {
37
+ DrawDefaultInspector();
38
+
39
+ MyComponent component = (MyComponent)target;
40
+
41
+ if (GUILayout.Button("Do Something"))
42
+ {
43
+ component.DoSomething();
44
+ }
45
+ }
46
+ }
47
+ ```
48
+
49
+ ## SerializedProperty Pattern (Undo Support)
50
+
51
+ ```csharp
52
+ [CustomEditor(typeof(MyComponent))]
53
+ public class MyComponentEditor : Editor
54
+ {
55
+ private SerializedProperty myProperty;
56
+
57
+ private void OnEnable()
58
+ {
59
+ myProperty = serializedObject.FindProperty("myField");
60
+ }
61
+
62
+ public override void OnInspectorGUI()
63
+ {
64
+ serializedObject.Update();
65
+
66
+ EditorGUILayout.PropertyField(myProperty);
67
+
68
+ serializedObject.ApplyModifiedProperties();
69
+ }
70
+ }
71
+ ```
72
+
73
+ ## PropertyDrawer
74
+
75
+ ```csharp
76
+ using UnityEditor;
77
+ using UnityEngine;
78
+
79
+ [CustomPropertyDrawer(typeof(MyData))]
80
+ public class MyDataDrawer : PropertyDrawer
81
+ {
82
+ public override void OnGUI(Rect position, SerializedProperty property, GUIContent label)
83
+ {
84
+ EditorGUI.BeginProperty(position, label, property);
85
+
86
+ position = EditorGUI.PrefixLabel(position, label);
87
+
88
+ var fieldProp = property.FindPropertyRelative("field");
89
+ EditorGUI.PropertyField(position, fieldProp, GUIContent.none);
90
+
91
+ EditorGUI.EndProperty();
92
+ }
93
+ }
94
+ ```
95
+
96
+ ## ScriptableWizard
97
+
98
+ ```csharp
99
+ using UnityEditor;
100
+ using UnityEngine;
101
+
102
+ public class MyWizard : ScriptableWizard
103
+ {
104
+ public string objectName = "New Object";
105
+ public int count = 1;
106
+
107
+ [MenuItem("Tools/My Wizard")]
108
+ static void CreateWizard()
109
+ {
110
+ DisplayWizard<MyWizard>("Create Objects", "Create", "Cancel");
111
+ }
112
+
113
+ void OnWizardCreate()
114
+ {
115
+ // Execute when "Create" clicked
116
+ }
117
+
118
+ void OnWizardUpdate()
119
+ {
120
+ // Validate input
121
+ isValid = !string.IsNullOrEmpty(objectName) && count > 0;
122
+ }
123
+ }
124
+ ```
125
+
126
+ ## Debug Overlay (Runtime)
127
+
128
+ ```csharp
129
+ using UnityEngine;
130
+
131
+ public class DebugOverlay : MonoBehaviour
132
+ {
133
+ private void OnGUI()
134
+ {
135
+ GUILayout.BeginArea(new Rect(10, 10, 200, 100));
136
+ GUILayout.Label($"FPS: {1f / Time.deltaTime:F1}");
137
+ GUILayout.Label($"Time: {Time.time:F2}");
138
+ GUILayout.EndArea();
139
+ }
140
+ }
141
+ ```
@@ -0,0 +1,14 @@
1
+ ---
2
+ name: ui-review
3
+ description: Performs a read-only review of Unity UI behavior, architecture, navigation, responsiveness, localization, accessibility, performance, and UX conformance.
4
+ allowed-tools: Read, Glob, Grep, Bash, Task
5
+ ---
6
+
7
+ # Ui Review
8
+
9
+ Read `.nccgs/project.yaml`, `.nccgs/state.md`, and the active context packet when present. Preserve Product Owner authority and unrelated work.
10
+
11
+ Read approved UX flows, UI requirements, platform/input policy, accessibility targets, implementation, scenes/assets, and tests. Pair UX and Unity UI lenses without conflating them. Inspect state ownership, navigation, focus, errors, scaling, layout expansion, binding, lifecycle, allocations, and runtime evidence. Report prioritized findings and subjective PO scenarios; do not redesign or edit.
12
+
13
+ Return outcome, evidence, affected records, blockers or decisions, residual risk, and the exact next workflow. Do not claim DONE unless this is the `closure` skill and every configured gate passes.
14
+
@@ -0,0 +1,282 @@
1
+ ---
2
+ name: ui-ugui
3
+ description: Unity uGUI (Canvas-based) UI expert. Understands, edits, and generates Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or .prefab UI files.
4
+ allowed-tools:
5
+ - Read
6
+ - Write
7
+ - Edit
8
+ - Glob
9
+ - Grep
10
+ ---
11
+
12
+ Understand existing Unity uGUI, make targeted edits, and generate new Canvas-based hierarchies.
13
+
14
+ When working with ScrollRect/ScrollView, read the reference file:
15
+ - `references/scrollview-setup.md` — Required hierarchy, setup rules, and common failures
16
+
17
+ ## Scope
18
+
19
+ Determine what the user is asking for:
20
+
21
+ | Request Type | Action |
22
+ |--------------|--------|
23
+ | Question about UI | **Understand** — analyze hierarchy, explain structure |
24
+ | Change specific element | **Edit** — targeted modification only |
25
+ | Create new UI | **Generate** — create new hierarchy |
26
+ | Fix/improve existing UI | **Edit** — modify existing, don't rebuild |
27
+
28
+ **Generate only what is requested:**
29
+
30
+ | Request | Output |
31
+ |---------|--------|
32
+ | UI layout | Prefab or scene hierarchy only |
33
+ | "with code" / "with logic" / "functional" | Hierarchy + scripts |
34
+
35
+ **These do NOT imply scripts:**
36
+ - "proper buttons" → well-configured Button components
37
+ - "working UI" → valid hierarchy that renders
38
+ - "menu screen" → visual layout only
39
+
40
+ ## Critical Rules
41
+
42
+ **Namespace disambiguation:**
43
+ - Always use fully qualified type names when creating or referencing UI components
44
+ - `UnityEngine.UI.Image`, not `Image`
45
+ - `UnityEngine.UI.Button`, not `Button`
46
+ - Other namespaces in the project can cause ambiguous type errors
47
+
48
+ **Verify before modifying:**
49
+ - Always check what currently exists before making changes
50
+ - Confirm parent objects exist before adding children
51
+ - Verify components are present before modifying properties
52
+ - Never assume hierarchy state — query it first
53
+
54
+ **Incremental fixes over rebuilds:**
55
+ - When fixing issues, make targeted corrections
56
+ - Never destroy and recreate entire hierarchies to fix problems — destroyed objects cause null reference cascades
57
+ - Prefer identifying the specific broken property and fixing only that over rewriting large sections
58
+ - **When a fix fails, revert the change** before trying an alternative approach
59
+
60
+ **One change at a time:**
61
+ - Make a single change, then verify the result
62
+ - Do not batch multiple unrelated modifications
63
+ - Be careful not to inadvertently modify or remove adjacent elements when editing a specific one
64
+ - If something fails, understand why before trying alternatives
65
+ - Avoid "shotgun debugging" with multiple simultaneous changes
66
+
67
+ **Color and visibility:**
68
+ - **Ensure text is readable by default:** When choosing colors, ensure text contrasts with its background — but respect intentional low-contrast uses (disabled states, placeholder text, decorative elements)
69
+ - **Check visibility for new elements:** After creating UI elements, verify they have non-zero size and are within parent bounds. Elements intentionally created hidden (for later toggling, animation, etc.) are fine
70
+
71
+ **Specification adherence:**
72
+ - **Honor user specifications exactly:** When the user provides pixel dimensions, hex colors, positions, spacing, or other exact values, apply them precisely — do not approximate or substitute
73
+ - **Minimize unrelated changes:** When editing, avoid changing properties the user didn't ask about unless a related adjustment is necessary for the fix to work
74
+
75
+ ## Conventions
76
+
77
+ **Follow project patterns first.** Search existing files before applying defaults.
78
+
79
+ | Type | Convention | Good | Bad |
80
+ |------|------------|------|-----|
81
+ | GameObject names | PascalCase | `SubmitButton` | `submit-button` |
82
+ | Prefab paths | Feature folders | `Assets/UI/Inventory/` | `Assets/Prefabs/UI/` |
83
+
84
+ ## Workflow
85
+
86
+ 1. **Verify state** — Check what exists in the scene/hierarchy before any action.
87
+ 2. **Analyze** — Determine exactly what's needed. No extras.
88
+ 3. **Search** — Find existing prefabs, canvases, assets. Don't assume paths.
89
+ 4. **Follow project patterns** — Match folder structure and naming.
90
+ 5. **Create or edit** — Build structure with proper anchoring, or make targeted edits.
91
+ 6. **Confirm result** — Verify the change worked before moving on.
92
+
93
+ ## Canvas Setup
94
+
95
+ Every UI needs a Canvas:
96
+
97
+ ```
98
+ Canvas (Screen Space - Overlay or Camera)
99
+ ├── CanvasScaler (Scale With Screen Size recommended)
100
+ ├── GraphicRaycaster
101
+ └── [UI Content]
102
+ ```
103
+
104
+ **CanvasScaler settings:**
105
+ - Default to UI Scale Mode "Scale With Screen Size" unless the project has a specific reason for "Constant Pixel Size" (e.g., pixel-art, fixed-resolution targets)
106
+ - Reference Resolution: Match project standards (e.g., 1920x1080)
107
+ - When creating a Canvas with Screen Space - Camera, **read the camera's reference resolution** first
108
+ - Match Width Or Height: 0.5 (balanced)
109
+ - If an existing Canvas uses "Constant Pixel Size", flag it and ask the user before changing
110
+ - Prefer anchors and Layout Groups over absolute pixel positions for layout
111
+
112
+ ## Layout Components
113
+
114
+ **Layout Groups control child sizing:**
115
+ - When a parent has a Layout Group, it manages child RectTransforms
116
+ - Children's anchors and sizeDelta may be overridden by the parent
117
+ - Understand whether the parent or child controls size before setting values
118
+
119
+ **Vertical/Horizontal Layout Groups:**
120
+ - Control Child Size: determines if parent sets child dimensions
121
+ - Child Force Expand: determines if children stretch to fill space
122
+ - If Control Child Size is off, children must have explicit sizes
123
+
124
+ **Avoiding layout conflicts:**
125
+ - Do not manually set child anchors/size when parent controls them
126
+ - Do not add Layout Group to an element that should have fixed size
127
+ - Nested Layout Groups require careful configuration of each level
128
+ - When layout is wrong, check parent settings before modifying child
129
+ - ContentSizeFitter on the **same** object as a Layout Group that has Control Child Size enabled = conflict
130
+ - ContentSizeFitter on a child whose parent has Control Child Size enabled = ContentSizeFitter is overridden (wasted)
131
+ - When using ContentSizeFitter with a Layout Group parent, disable Control Child Size on the parent for the relevant axis
132
+ - Common pattern: ScrollView Content should have ContentSizeFitter + VerticalLayoutGroup where VLG controls children but ContentSizeFitter sizes the Content itself
133
+
134
+ **Grid Layout Group:**
135
+ - For inventory grids, card layouts
136
+ - Cell Size must be set explicitly — children are sized to match
137
+ - Constraint controls row/column limits
138
+
139
+ **Content Size Fitter:**
140
+ - Horizontal/Vertical Fit: Preferred Size
141
+ - Use on containers that should size to their content
142
+ - Requires a layout element or text component to provide preferred size
143
+
144
+ ## RectTransform Anchoring
145
+
146
+ **Elements must have non-zero size to be visible:**
147
+ - Set explicit width/height via sizeDelta, or
148
+ - Use stretch anchors with proper offsets, or
149
+ - Let a parent Layout Group control size (with Control Child Size enabled)
150
+
151
+ **Anchor configuration order:**
152
+ 1. Set anchor preset first (corner, edge, or stretch)
153
+ 2. Then set position/offset values
154
+ 3. Verify the resulting size is non-zero
155
+
156
+ **Common patterns:**
157
+ - **Stretch anchors** — for responsive elements that fill available space
158
+ - **Corner anchors** — for fixed-position, fixed-size elements
159
+ - **Edge anchors** — for elements that stretch in one direction only
160
+
161
+ **Positioning from natural language descriptions:**
162
+ When the user describes a position (e.g., "top right", "bottom bar", "left side"):
163
+ 1. Determine if it's a **corner** (fixed point), an **edge** (stretch along one axis), or **fill** (stretch both axes)
164
+ 2. Set anchor min and anchor max — for corners these are the same point; for edges/fill they span a range
165
+ 3. **Set pivot to match the anchor point** — pivot must align with where the element is anchored, not left at the default (0.5, 0.5). A "top right" element needs pivot at the top-right corner; a "top bar" needs pivot at the top edge center
166
+ 4. Set position/offset values **after** anchors and pivot are configured
167
+
168
+ **Visibility checklist:**
169
+ - Width and height are both greater than zero
170
+ - Element is within parent bounds
171
+ - Element is not obscured by siblings (check hierarchy order)
172
+ - Image component has a sprite or color with alpha > 0
173
+
174
+ ## Common Components
175
+
176
+ | Component | Use Case |
177
+ |-----------|----------|
178
+ | `Image` | Backgrounds, icons |
179
+ | `RawImage` | Render textures, videos |
180
+ | `Text (TMP)` | All text (use TextMeshPro) |
181
+ | `Button` | Clickable elements |
182
+ | `Toggle` | Checkboxes, radio buttons |
183
+ | `Slider` | Value ranges |
184
+ | `ScrollRect` | Scrollable content |
185
+ | `InputField (TMP)` | Text input |
186
+
187
+ ## Best Practices
188
+
189
+ - Use TextMeshPro for all text (not legacy Text)
190
+ - WorldSpace UI that have text should also use Text Mesh Pro, be sure to review the project and import the TMP essentials if they are not present in the project
191
+ - If the TextMeshPro Essentials were imported be sure to close the TMP Importer Windows and the Import Unity Package Window once the assets are imported
192
+ - Organize hierarchy logically (Header, Content, Footer)
193
+ - Use Layout Groups instead of manual positioning where possible
194
+ - Set Raycast Target = false on non-interactive images
195
+ - Use sprite atlases for performance
196
+
197
+ **Never use** `EditorApplication.ExecuteMenuItem("Window/TextMeshPro/Import TMP Essential Resources")`, unless the user asks for an interactive TMP Essentials installation. It opens a modal dialog that blocks whatever invoked it until a human dismisses it.
198
+
199
+ **Do not use** `AssetDatabase.ImportPackage()` for TMP resources, instead `TMP_PackageResourceImporter.ImportResources()` is the canonical non-interactive API.
200
+
201
+ ## Interaction Readiness
202
+
203
+ Before completing any UI that contains interactive elements, verify:
204
+
205
+ 1. **EventSystem** must exist in the scene (exactly one)
206
+ 2. **GraphicRaycaster** must be on the Canvas
207
+ 3. **Raycast Target = true** on interactive elements (and false on non-interactive ones to avoid blocking)
208
+ 4. **Button.onClick should be wired** (via inspector or script) — only when scripts or logic were requested
209
+
210
+ If the first three are missing, interactive elements will exist visually but fail silently.
211
+
212
+ ## Understanding
213
+
214
+ When the user asks questions about existing UI:
215
+
216
+ **Read the hierarchy first.** Don't assume — always inspect the scene or prefab before answering.
217
+
218
+ **Analyze structure:**
219
+ - Identify the Canvas and its render mode
220
+ - Map the parent-child relationships
221
+ - Identify which Layout Groups control which children
222
+ - Check RectTransform anchor configurations
223
+
224
+ **Answer questions about:**
225
+ - "What does this button do?" → Explain component, hierarchy position, event wiring
226
+ - "How is this laid out?" → Describe Layout Groups, anchoring, hierarchy
227
+ - "Why is this invisible?" → Check size, anchors, parent bounds, component state
228
+ - "What controls this element's size?" → Trace Layout Group settings or anchors
229
+
230
+ ## Editing
231
+
232
+ For targeted changes to existing UI:
233
+
234
+ **Read before editing.** Always inspect the current state first.
235
+
236
+ **Edit workflow:**
237
+ 1. Verify the target object exists
238
+ 2. Identify the specific property or component to change
239
+ 3. Make the minimal change required
240
+ 4. Verify the result before proceeding
241
+
242
+ **Never destroy to fix:**
243
+ - Destroying objects cascades to null references elsewhere
244
+ - Fix properties in place rather than recreating
245
+ - If an element must be removed, update all references first
246
+
247
+ ## C# (Only When Requested)
248
+
249
+ - Use fully qualified UI types to avoid namespace conflicts
250
+ - Use `[SerializeField]` for inspector references
251
+ - Cache component references in Awake()
252
+ - Use events/delegates for button callbacks
253
+ - Place scripts in same folder as prefabs (follow project patterns)
254
+
255
+ **Component references:**
256
+ - Verify referenced objects exist before accessing them
257
+ - Handle cases where serialized references may be null
258
+ - When wiring up references, confirm the target component is present
259
+
260
+ ## Error Recovery
261
+
262
+ When something goes wrong:
263
+
264
+ **Stop and diagnose:**
265
+ - Identify the exact error or symptom
266
+ - Determine the root cause before attempting fixes
267
+ - Do not make speculative changes
268
+
269
+ **Fix incrementally:**
270
+ - Address one issue at a time
271
+ - Verify each fix before moving to the next
272
+ - Keep track of what was changed
273
+
274
+ **Avoid destructive patterns:**
275
+ - "Start fresh" strategies destroy working elements along with broken ones
276
+ - Rebuilding entire hierarchies creates more problems than it solves
277
+ - Prefer surgical fixes to wholesale replacements
278
+
279
+ **When stuck:**
280
+ - Re-verify the current state of the hierarchy
281
+ - Check if previous changes were actually applied
282
+ - Consider if the approach itself is wrong rather than the implementation
@@ -0,0 +1,29 @@
1
+ # ScrollView Setup
2
+
3
+ ScrollRect requires a specific hierarchy to function correctly. Missing or misordered components cause jitter, duplication, or non-scrollable content.
4
+
5
+ **Required hierarchy:**
6
+ ```
7
+ ScrollView (ScrollRect)
8
+ ├── Viewport (RectTransform + Mask + Image)
9
+ │ └── Content (RectTransform + VerticalLayoutGroup + ContentSizeFitter)
10
+ │ └── [Children — static or added at runtime]
11
+ └── Scrollbar (optional)
12
+ ```
13
+
14
+ **Setup rules:**
15
+ - **ScrollRect** component goes on the root ScrollView object
16
+ - **Viewport** must have a `Mask` component and an `Image` component (Mask requires Image)
17
+ - **Content** must have `ContentSizeFitter` with Vertical Fit set to "Preferred Size" so the scroll area grows with children
18
+ - ScrollRect references: assign Content to `Content`, Viewport to `Viewport`, and optionally assign a Scrollbar
19
+ - Content can contain static children (settings lists, about pages) or be populated dynamically at runtime
20
+
21
+ **Dynamic population (runtime items):**
22
+ - **Clear existing children** before populating to prevent duplication on panel re-open
23
+ - Instantiate item prefabs as children of the Content object
24
+ - The ContentSizeFitter + VerticalLayoutGroup on Content will automatically size the scrollable area
25
+
26
+ **Common failures:**
27
+ - Items duplicated on every open → Content not cleared before populating
28
+ - Content not scrollable → missing ContentSizeFitter on Content, or Viewport missing Mask
29
+ - Jitter/flickering → ContentSizeFitter conflict with parent Layout Group (see "Avoiding layout conflicts" in the main skill)