@aqian0/dsh-unity 0.0.0-stage → 0.1.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 (360) hide show
  1. package/CHANGELOG.md +53 -0
  2. package/LICENSE-UNITY-COMPANION.md +122 -0
  3. package/LICENSE.md +31 -0
  4. package/NOTICE.md +90 -0
  5. package/README.md +273 -2
  6. package/cordis.patch.yml +22 -0
  7. package/docs/design.md +297 -0
  8. package/icon.svg +16 -0
  9. package/lib/frontmatter.js +392 -0
  10. package/lib/gating.js +105 -0
  11. package/lib/harness.js +16 -0
  12. package/lib/index.js +171 -0
  13. package/lib/project.js +210 -0
  14. package/lib/registry.js +268 -0
  15. package/lib/requirements.js +214 -0
  16. package/lib/skills.js +191 -0
  17. package/lib/types/frontmatter.d.ts +84 -0
  18. package/lib/types/gating.d.ts +80 -0
  19. package/lib/types/harness.d.ts +152 -0
  20. package/lib/types/index.d.ts +75 -0
  21. package/lib/types/project.d.ts +93 -0
  22. package/lib/types/registry.d.ts +96 -0
  23. package/lib/types/requirements.d.ts +67 -0
  24. package/lib/types/skills.d.ts +54 -0
  25. package/lib/types/watch.d.ts +34 -0
  26. package/lib/watch.js +84 -0
  27. package/locale/en.json +6 -0
  28. package/locale/zh.json +6 -0
  29. package/package.json +70 -4
  30. package/skills/2d-pixel-perfect/SKILL.md +208 -0
  31. package/skills/2d-pixel-perfect/references/api-reference.md +81 -0
  32. package/skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
  33. package/skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
  34. package/skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
  35. package/skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
  36. package/skills/asset-transformer-toolkit/SECURITY.md +15 -0
  37. package/skills/asset-transformer-toolkit/SKILL.md +39 -0
  38. package/skills/asset-transformer-toolkit/references/create-importer.md +121 -0
  39. package/skills/asset-transformer-toolkit/references/lods.md +61 -0
  40. package/skills/asset-transformer-toolkit/references/rule-api.md +154 -0
  41. package/skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
  42. package/skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
  43. package/skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
  44. package/skills/audio-setup-mixers/SECURITY.md +16 -0
  45. package/skills/audio-setup-mixers/SKILL.md +127 -0
  46. package/skills/audio-setup-mixers/references/api.md +162 -0
  47. package/skills/build-gtk/SECURITY.md +16 -0
  48. package/skills/build-gtk/SKILL.md +200 -0
  49. package/skills/build-gtk/references/api-reference.md +33 -0
  50. package/skills/build-gtk/references/graph-api-gaps.md +96 -0
  51. package/skills/build-gtk/references/runtime-and-visualization.md +191 -0
  52. package/skills/build-gtk/references/state-machine-api.md +270 -0
  53. package/skills/build-gtk/references/where-the-docs-stop.md +49 -0
  54. package/skills/build-live-game/SKILL.md +159 -0
  55. package/skills/build-live-game/references/achievements.md +757 -0
  56. package/skills/build-live-game/references/apis.md +271 -0
  57. package/skills/build-live-game/references/authentication.md +431 -0
  58. package/skills/build-live-game/references/battlepass.md +904 -0
  59. package/skills/build-live-game/references/blueprints-and-samples.md +75 -0
  60. package/skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
  61. package/skills/build-live-game/references/cloud-code-modules.md +1276 -0
  62. package/skills/build-live-game/references/cloud-code.md +58 -0
  63. package/skills/build-live-game/references/cloud-save.md +464 -0
  64. package/skills/build-live-game/references/deployment.md +231 -0
  65. package/skills/build-live-game/references/orientation.md +30 -0
  66. package/skills/build-live-game/references/player-account.md +821 -0
  67. package/skills/build-live-game/references/remote-config.md +96 -0
  68. package/skills/build-live-game/references/services-overview.md +76 -0
  69. package/skills/build-live-game/references/tooling.md +375 -0
  70. package/skills/build-live-game/references/ugs-cli.md +86 -0
  71. package/skills/craft-game-floors/SECURITY.md +23 -0
  72. package/skills/craft-game-floors/SKILL.md +134 -0
  73. package/skills/craft-game-floors/references/art-direction.md +85 -0
  74. package/skills/craft-game-floors/references/camera-rigs.md +51 -0
  75. package/skills/craft-game-floors/references/character-motion.md +35 -0
  76. package/skills/craft-game-floors/references/game-audio.md +47 -0
  77. package/skills/craft-game-floors/references/game-feel.md +68 -0
  78. package/skills/craft-game-floors/references/game-shell.md +45 -0
  79. package/skills/craft-game-floors/references/live-floor.md +35 -0
  80. package/skills/craft-game-floors/references/placeholder-assets.md +35 -0
  81. package/skills/craft-game-floors/references/scene-lighting.md +52 -0
  82. package/skills/craft-game-floors/references/toon-shading.md +34 -0
  83. package/skills/craft-game-floors/references/vfx.md +40 -0
  84. package/skills/craft-game-floors/references/visual-scorecard.md +43 -0
  85. package/skills/create-2d-physics/SECURITY.md +16 -0
  86. package/skills/create-2d-physics/SKILL.md +128 -0
  87. package/skills/create-2d-physics/references/2d-physics-core.md +155 -0
  88. package/skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
  89. package/skills/create-tile-palette-or-rule-tiles/SKILL.md +95 -0
  90. package/skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
  91. package/skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
  92. package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +37 -0
  93. package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +219 -0
  94. package/skills/create-tile-palette-or-rule-tiles/references/ruletile.md +95 -0
  95. package/skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
  96. package/skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
  97. package/skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
  98. package/skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
  99. package/skills/fix-3d-physics-collisions/SECURITY.md +17 -0
  100. package/skills/fix-3d-physics-collisions/SKILL.md +139 -0
  101. package/skills/fix-3d-physics-collisions/references/collision-checklist.md +80 -0
  102. package/skills/fix-3d-physics-collisions/references/collision-debugger.md +18 -0
  103. package/skills/fix-3d-physics-collisions/references/console-errors-table.md +9 -0
  104. package/skills/fix-3d-physics-collisions/references/kinematic-trigger-facts.md +18 -0
  105. package/skills/fix-3d-physics-collisions/references/other-symptoms.md +29 -0
  106. package/skills/fix-3d-physics-collisions/references/raycast-checklist.md +8 -0
  107. package/skills/fix-3d-physics-collisions/references/topic-map.md +42 -0
  108. package/skills/fix-3d-physics-collisions/references/trigger-checklist.md +9 -0
  109. package/skills/fix-3d-physics-collisions/scripts/CollisionDebugger.cs +561 -0
  110. package/skills/generate-editor-search-query/SECURITY.md +17 -0
  111. package/skills/generate-editor-search-query/SKILL.md +117 -0
  112. package/skills/generate-editor-search-query/references/open-search-window.md +70 -0
  113. package/skills/generate-editor-search-query/references/query-patterns.md +124 -0
  114. package/skills/implement-in-app-purchases/SKILL.md +82 -0
  115. package/skills/implement-in-app-purchases/references/api-details.md +41 -0
  116. package/skills/implement-in-app-purchases/references/api-notes.md +105 -0
  117. package/skills/implement-in-app-purchases/references/codeless-catalog.md +197 -0
  118. package/skills/implement-in-app-purchases/references/convert-adapty.md +270 -0
  119. package/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
  120. package/skills/implement-in-app-purchases/references/convert-revenuecat.md +277 -0
  121. package/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
  122. package/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +46 -0
  123. package/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +197 -0
  124. package/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +302 -0
  125. package/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +357 -0
  126. package/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +253 -0
  127. package/skills/implement-in-app-purchases/references/platform-notes.md +55 -0
  128. package/skills/implement-in-app-purchases/references/pre-check.md +207 -0
  129. package/skills/implement-in-app-purchases/references/topic-map.md +46 -0
  130. package/skills/initialize-ai-navigation/SKILL.md +109 -0
  131. package/skills/initialize-ai-navigation/references/navigation-system.md +793 -0
  132. package/skills/initialize-ai-navigation/references/topic-map.md +66 -0
  133. package/skills/levelplay-unity-integration/SKILL.md +122 -0
  134. package/skills/levelplay-unity-integration/references/adding-more-ad-formats.md +15 -0
  135. package/skills/levelplay-unity-integration/references/banner-api.md +927 -0
  136. package/skills/levelplay-unity-integration/references/best-practices.md +604 -0
  137. package/skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
  138. package/skills/levelplay-unity-integration/references/examples.md +10 -0
  139. package/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
  140. package/skills/levelplay-unity-integration/references/initialization-api.md +851 -0
  141. package/skills/levelplay-unity-integration/references/interstitial-api.md +907 -0
  142. package/skills/levelplay-unity-integration/references/ios-setup.md +463 -0
  143. package/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
  144. package/skills/levelplay-unity-integration/references/privacy-settings.md +593 -0
  145. package/skills/levelplay-unity-integration/references/production-release-checklist.md +22 -0
  146. package/skills/levelplay-unity-integration/references/rewarded-api.md +918 -0
  147. package/skills/levelplay-unity-integration/references/step-0-new-or-migration.md +8 -0
  148. package/skills/levelplay-unity-integration/references/step-1-verify-environment.md +4 -0
  149. package/skills/levelplay-unity-integration/references/step-10-testing.md +15 -0
  150. package/skills/levelplay-unity-integration/references/step-2-business-goals.md +12 -0
  151. package/skills/levelplay-unity-integration/references/step-3-install-sdk.md +55 -0
  152. package/skills/levelplay-unity-integration/references/step-4-native-dependencies.md +22 -0
  153. package/skills/levelplay-unity-integration/references/step-5-app-key-and-ad-units.md +18 -0
  154. package/skills/levelplay-unity-integration/references/step-6-5-privacy-and-regulation.md +51 -0
  155. package/skills/levelplay-unity-integration/references/step-6-admob-keys.md +16 -0
  156. package/skills/levelplay-unity-integration/references/step-7-initialize.md +50 -0
  157. package/skills/levelplay-unity-integration/references/step-8-ad-unit-strategy.md +16 -0
  158. package/skills/levelplay-unity-integration/references/step-9-implement-ad-units.md +66 -0
  159. package/skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
  160. package/skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
  161. package/skills/localize-unity-project/SKILL.md +159 -0
  162. package/skills/localize-unity-project/references/api-notes.md +15 -0
  163. package/skills/localize-unity-project/references/cjk-fonts.md +83 -0
  164. package/skills/localize-unity-project/references/docs-map.md +42 -0
  165. package/skills/localize-unity-project/references/documentation-lookup.md +33 -0
  166. package/skills/localize-unity-project/references/locale-switching.md +17 -0
  167. package/skills/localize-unity-project/references/table-completeness-check.md +47 -0
  168. package/skills/localize-unity-project/references/translating-existing-project.md +47 -0
  169. package/skills/localize-unity-project/references/translation-strategy.md +41 -0
  170. package/skills/localize-unity-project/references/troubleshooting.md +12 -0
  171. package/skills/localize-unity-project/scripts/L10nBatchProcessor.cs +191 -0
  172. package/skills/localize-unity-project/scripts/LocalizedFontAsset.cs +18 -0
  173. package/skills/manage-sprite-atlas/SKILL.md +202 -0
  174. package/skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
  175. package/skills/manage-sprite-atlas/references/advanced-manual-authoring.md +19 -0
  176. package/skills/manage-sprite-atlas/references/api.md +382 -0
  177. package/skills/manage-sprite-atlas/references/best-practices.md +183 -0
  178. package/skills/manage-sprite-atlas/references/common-errors.md +123 -0
  179. package/skills/manage-sprite-atlas/references/complete-workflow.md +61 -0
  180. package/skills/manage-sprite-atlas/references/custom-packing.md +147 -0
  181. package/skills/manage-sprite-atlas/references/delivery-mechanism.md +30 -0
  182. package/skills/manage-sprite-atlas/references/key-requirements.md +21 -0
  183. package/skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
  184. package/skills/manage-sprite-atlas/references/namespaces.md +15 -0
  185. package/skills/manage-sprite-atlas/references/v2-architecture.md +21 -0
  186. package/skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
  187. package/skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
  188. package/skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
  189. package/skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
  190. package/skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
  191. package/skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
  192. package/skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
  193. package/skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
  194. package/skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
  195. package/skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
  196. package/skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
  197. package/skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
  198. package/skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
  199. package/skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
  200. package/skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
  201. package/skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
  202. package/skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
  203. package/skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
  204. package/skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
  205. package/skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
  206. package/skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
  207. package/skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
  208. package/skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
  209. package/skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
  210. package/skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
  211. package/skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
  212. package/skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
  213. package/skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
  214. package/skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
  215. package/skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
  216. package/skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
  217. package/skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
  218. package/skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
  219. package/skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
  220. package/skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
  221. package/skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
  222. package/skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
  223. package/skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
  224. package/skills/migrate-birp-to-urp/SECURITY.md +16 -0
  225. package/skills/migrate-birp-to-urp/SKILL.md +167 -0
  226. package/skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
  227. package/skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
  228. package/skills/migrate-birp-to-urp/references/conversion-and-rendering-triage.md +113 -0
  229. package/skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
  230. package/skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
  231. package/skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
  232. package/skills/migrate-birp-to-urp/references/parity-validation-and-troubleshooting.md +114 -0
  233. package/skills/migrate-birp-to-urp/references/preflight-and-urp-setup.md +195 -0
  234. package/skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
  235. package/skills/new-unity-project/SECURITY.md +26 -0
  236. package/skills/new-unity-project/SKILL.md +171 -0
  237. package/skills/new-unity-project/references/checklist.md +18 -0
  238. package/skills/new-unity-project/references/common-mistakes.md +15 -0
  239. package/skills/new-unity-project/references/skill-setup.md +66 -0
  240. package/skills/new-unity-project/references/step-1-concept.md +13 -0
  241. package/skills/new-unity-project/references/step-2-platforms-and-create.md +31 -0
  242. package/skills/new-unity-project/references/step-3-join-and-reconcile.md +16 -0
  243. package/skills/new-unity-project/references/step-4-source-control.md +9 -0
  244. package/skills/new-unity-project/references/step-5-packages.md +18 -0
  245. package/skills/new-unity-project/references/step-6-identity-and-floors.md +20 -0
  246. package/skills/new-unity-project/references/step-7-visual-baseline.md +75 -0
  247. package/skills/new-unity-project/references/step-8-first-commit.md +21 -0
  248. package/skills/new-unity-project/references/step-9-handoff.md +23 -0
  249. package/skills/optimize-audio/SECURITY.md +16 -0
  250. package/skills/optimize-audio/SKILL.md +120 -0
  251. package/skills/optimize-audio/references/diagnostics.md +42 -0
  252. package/skills/optimize-audio/references/troubleshooting.md +41 -0
  253. package/skills/optimize-audio/resources/audio-import-api.md +149 -0
  254. package/skills/optimize-audio/resources/platform-settings.md +48 -0
  255. package/skills/optimize-text-mesh-pro/SKILL.md +181 -0
  256. package/skills/optimize-text-mesh-pro/references/dynamic-atlas-and-profiling.md +28 -0
  257. package/skills/optimize-text-mesh-pro/references/topic-map.md +36 -0
  258. package/skills/optimize-web/SECURITY.md +16 -0
  259. package/skills/optimize-web/SKILL.md +157 -0
  260. package/skills/optimize-web/references/editor-csharp.md +120 -0
  261. package/skills/optimize-web/references/topic-map.md +49 -0
  262. package/skills/optimize-web/references/troubleshooting.md +45 -0
  263. package/skills/optimize-web/references/understand-request.md +19 -0
  264. package/skills/optimize-web/references/web-assets-quality.md +59 -0
  265. package/skills/optimize-web/references/web-player-settings.md +39 -0
  266. package/skills/optimize-web/references/web-profiling-memory.md +71 -0
  267. package/skills/optimize-web/scripts/WebOptimizer.cs +46 -0
  268. package/skills/optimize-web/scripts/toktx-examples.sh +11 -0
  269. package/skills/setup-multiplayer-services/SKILL.md +36 -0
  270. package/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
  271. package/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
  272. package/skills/setup-multiplayer-services/references/examples.md +33 -0
  273. package/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
  274. package/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
  275. package/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
  276. package/skills/setup-vivox-voice-chat/SECURITY.md +16 -0
  277. package/skills/setup-vivox-voice-chat/SKILL.md +166 -0
  278. package/skills/setup-vivox-voice-chat/references/api-reference-lookup.md +28 -0
  279. package/skills/setup-vivox-voice-chat/references/docs-topic-map.md +13 -0
  280. package/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
  281. package/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
  282. package/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
  283. package/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
  284. package/skills/setup-vivox-voice-chat/references/voice-channels.md +92 -0
  285. package/skills/shader-graph-create-custom-node/SKILL.md +25 -0
  286. package/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
  287. package/skills/sprite-editor/SECURITY.md +16 -0
  288. package/skills/sprite-editor/SKILL.md +66 -0
  289. package/skills/sprite-editor/references/api_reference.md +151 -0
  290. package/skills/sprite-editor/references/background.md +112 -0
  291. package/skills/sprite-editor/references/templates.md +72 -0
  292. package/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
  293. package/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
  294. package/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
  295. package/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
  296. package/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
  297. package/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
  298. package/skills/sprite-editor/scripts/README.md +134 -0
  299. package/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
  300. package/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
  301. package/skills/sprite-segment-3x3grid/SKILL.md +177 -0
  302. package/skills/sprite-segment-3x3grid/references/topic-map.md +37 -0
  303. package/skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
  304. package/skills/ui/SKILL.md +142 -0
  305. package/skills/ui-imgui/SKILL.md +180 -0
  306. package/skills/ui-imgui/references/gui-elements.md +156 -0
  307. package/skills/ui-imgui/references/templates.md +141 -0
  308. package/skills/ui-ugui/SKILL.md +217 -0
  309. package/skills/ui-ugui/references/layout-and-anchors.md +61 -0
  310. package/skills/ui-ugui/references/scrollview-setup.md +29 -0
  311. package/skills/ui-uitk/SKILL.md +229 -0
  312. package/skills/ui-uitk/references/common-issues.md +74 -0
  313. package/skills/ui-uitk/references/custom-elements.md +241 -0
  314. package/skills/ui-uitk/references/painter2d.md +282 -0
  315. package/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
  316. package/skills/ui-uitk/references/svg-icons.md +136 -0
  317. package/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
  318. package/skills/ui-uitk/references/uss-guide.md +138 -0
  319. package/skills/unity-cli/CHANGELOG.md +524 -0
  320. package/skills/unity-cli/SECURITY.md +68 -0
  321. package/skills/unity-cli/SKILL.md +160 -0
  322. package/skills/unity-cli/references/auth-license-cloud.md +318 -0
  323. package/skills/unity-cli/references/bootstrap-project.md +177 -0
  324. package/skills/unity-cli/references/build-run-test.md +555 -0
  325. package/skills/unity-cli/references/catalog-plugins.md +86 -0
  326. package/skills/unity-cli/references/ci-recipes.md +76 -0
  327. package/skills/unity-cli/references/cloud-automation.md +819 -0
  328. package/skills/unity-cli/references/cloud-workflows.md +19 -0
  329. package/skills/unity-cli/references/collaboration.md +533 -0
  330. package/skills/unity-cli/references/config-hub.md +239 -0
  331. package/skills/unity-cli/references/diagnostics-maintenance.md +718 -0
  332. package/skills/unity-cli/references/docs-workflow.md +179 -0
  333. package/skills/unity-cli/references/editor-targeting.md +29 -0
  334. package/skills/unity-cli/references/editors-install.md +490 -0
  335. package/skills/unity-cli/references/environment-variables.md +42 -0
  336. package/skills/unity-cli/references/exit-codes.md +47 -0
  337. package/skills/unity-cli/references/global-flags.md +32 -0
  338. package/skills/unity-cli/references/integration-advanced.md +1130 -0
  339. package/skills/unity-cli/references/notes.md +20 -0
  340. package/skills/unity-cli/references/notifications.md +39 -0
  341. package/skills/unity-cli/references/playmode-verification-loop.md +279 -0
  342. package/skills/unity-cli/references/projects-templates.md +997 -0
  343. package/skills/unity-cli/references/scene-editing-preflight.md +25 -0
  344. package/skills/unity-cli/references/setup-and-help.md +54 -0
  345. package/skills/unity-cli/references/version-control.md +612 -0
  346. package/skills/unity-package-management/SKILL.md +169 -0
  347. package/skills/unity-package-management/references/discovering-packages.md +66 -0
  348. package/skills/unity-package-management/references/headless-run.md +31 -0
  349. package/skills/unity-package-management/references/installer-script.md +92 -0
  350. package/skills/unity-package-management/references/select-packages.md +126 -0
  351. package/skills/unity-pipeline/SECURITY.md +17 -0
  352. package/skills/unity-pipeline/SKILL.md +205 -0
  353. package/skills/unity-pipeline/references/csharp-eval.md +23 -0
  354. package/skills/unity-pipeline/references/multiplayer-play-mode.md +103 -0
  355. package/skills/urp-postprocessing/SECURITY.md +16 -0
  356. package/skills/urp-postprocessing/SKILL.md +188 -0
  357. package/skills/urp-postprocessing/references/code-templates.md +150 -0
  358. package/skills/urp-postprocessing/references/effect-reference.md +86 -0
  359. package/skills/validate-urp-render-graph-renderer-feature/SKILL.md +92 -0
  360. package/skills/validate-urp-render-graph-renderer-feature/references/validation-checklist.md +179 -0
@@ -0,0 +1,180 @@
1
+ ---
2
+ name: ui-imgui
3
+ description: 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.
4
+ ---
5
+
6
+ **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:
7
+ - User is modifying existing IMGUI code
8
+ - User explicitly requests IMGUI/immediate mode
9
+ - The project exclusively uses IMGUI for editor tools
10
+
11
+ When activated, read the reference files:
12
+ - [references/templates.md](references/templates.md) — EditorWindow, Inspector, PropertyDrawer templates
13
+ - [references/gui-elements.md](references/gui-elements.md) — GUI elements, layout groups, styling
14
+
15
+ ## When to Use This Skill
16
+
17
+ **IMPORTANT:** This skill is for **legacy IMGUI code only**. Use this skill when:
18
+
19
+ - User is maintaining/updating **existing** IMGUI editor code (files with `OnGUI()`, `OnInspectorGUI()`)
20
+ - User **explicitly requests** IMGUI/immediate mode GUI
21
+ - Project exclusively uses IMGUI for all editor tools
22
+
23
+ **Do NOT use this skill for:**
24
+ - New editor windows (use UI Toolkit with `CreateGUI()` instead)
25
+ - New custom inspectors (use UI Toolkit instead)
26
+ - Requests that don't explicitly mention IMGUI or OnGUI
27
+
28
+ **Legacy IMGUI is used for:**
29
+ - **Editor windows** — `EditorWindow` classes with `OnGUI()`
30
+ - **Custom inspectors** — `Editor`, `PropertyDrawer` classes with `OnInspectorGUI()`
31
+ - **Debug overlays** — `OnGUI()` in MonoBehaviour (runtime)
32
+
33
+ IMGUI is **not** for runtime game UI — use UI Toolkit or uGUI instead.
34
+
35
+ ## Scope
36
+
37
+ **Generate only what is requested (for legacy IMGUI code):**
38
+
39
+ | Request | Output | Note |
40
+ |---------|--------|------|
41
+ | Editor window (IMGUI/OnGUI) | `EditorWindow` with `OnGUI()` | Only if explicitly IMGUI |
42
+ | Custom inspector (IMGUI) | `Editor` with `OnInspectorGUI()` | Only if explicitly IMGUI |
43
+ | Property drawer (IMGUI) | `PropertyDrawer` with `OnGUI()` | Only if explicitly IMGUI |
44
+ | Debug overlay | `MonoBehaviour` with `OnGUI()` | Runtime debugging |
45
+ | Update existing IMGUI script | Modify existing OnGUI code | Always appropriate |
46
+
47
+ **Clarify if ambiguous:**
48
+ - "inspector" → Custom Editor for a specific type, or PropertyDrawer? **Also ask:** Should this use UI Toolkit (modern) or IMGUI (legacy)?
49
+ - "editor window" → **First ask:** Should this use UI Toolkit (modern/CreateGUI) or IMGUI (legacy/OnGUI)?
50
+ - "tool window" → EditorWindow with what functionality? Which UI system?
51
+
52
+ ## Conventions
53
+
54
+ **Follow project patterns first.** Search existing editor scripts before applying defaults.
55
+
56
+ | Type | Convention | Good | Bad |
57
+ |------|------------|------|-----|
58
+ | Script names | PascalCase | `MyToolWindow.cs` | `my-tool-window.cs` |
59
+ | EditorWindow | `[Name]Window.cs` | `LevelEditorWindow.cs` | `LevelEditor.cs` |
60
+ | Custom Editor | `[Type]Editor.cs` | `EnemyEditor.cs` | `EnemyInspector.cs` |
61
+ | PropertyDrawer | `[Type]Drawer.cs` | `RangeDrawer.cs` | `RangePropertyDrawer.cs` |
62
+ | Location | `Editor` folder | `Assets/Editor/` | `Assets/Scripts/` |
63
+
64
+ **Editor folder is required** — Scripts using `UnityEditor` namespace must be in an `Editor` folder or they will fail to build.
65
+
66
+ ## Workflow
67
+
68
+ 1. **Analyze** — Determine script type needed (EditorWindow, Editor, PropertyDrawer, etc.)
69
+ 2. **Search** — Find existing editor scripts to match patterns
70
+ 3. **Follow project patterns** — Match folder structure and naming
71
+ 4. **Create script** — Use appropriate base class and attributes
72
+ 5. **Implement OnGUI** — Build the interface with layout groups
73
+
74
+ ## Script Structure
75
+
76
+ ### EditorWindow
77
+ ```
78
+ [MenuItem attribute] → adds to menu
79
+ ShowWindow() static method → opens window
80
+ OnGUI() → draws interface
81
+ OnEnable/OnDisable → initialization/cleanup
82
+ ```
83
+
84
+ ### Custom Editor
85
+ ```
86
+ [CustomEditor attribute] → targets component type
87
+ OnInspectorGUI() → draws inspector
88
+ OnEnable() → cache SerializedProperties
89
+ serializedObject.Update/ApplyModifiedProperties → undo support
90
+ ```
91
+
92
+ ### PropertyDrawer
93
+ ```
94
+ [CustomPropertyDrawer attribute] → targets type or attribute
95
+ OnGUI(Rect, SerializedProperty, GUIContent) → draws property
96
+ GetPropertyHeight() → custom height if needed
97
+ ```
98
+
99
+ ## Key Rules
100
+
101
+ - **Cache GUIStyle objects** — never create new GUIStyle in OnGUI (causes memory allocation every frame)
102
+ - **Use SerializedProperty** — for proper undo/redo support in inspectors
103
+ - **Call ApplyModifiedProperties()** — after any serialized object changes
104
+ - **Use EditorGUILayout** — for editor scripts (auto-layout)
105
+ - **Use GUILayout** — for runtime OnGUI
106
+ - **Begin/End pairs** — always match BeginHorizontal with EndHorizontal, etc.
107
+ - **Editor folder required** — scripts fail to build if not in Editor folder
108
+
109
+ ## Layout Basics
110
+
111
+ **Horizontal grouping:**
112
+ ```csharp
113
+ EditorGUILayout.BeginHorizontal();
114
+ // elements appear side by side
115
+ EditorGUILayout.EndHorizontal();
116
+ ```
117
+
118
+ **Vertical grouping:**
119
+ ```csharp
120
+ EditorGUILayout.BeginVertical("box");
121
+ // elements appear stacked, with box style
122
+ EditorGUILayout.EndVertical();
123
+ ```
124
+
125
+ **Scroll view:**
126
+ ```csharp
127
+ scrollPos = EditorGUILayout.BeginScrollView(scrollPos);
128
+ // scrollable content
129
+ EditorGUILayout.EndScrollView();
130
+ ```
131
+
132
+ **Foldout section:**
133
+ ```csharp
134
+ showSection = EditorGUILayout.Foldout(showSection, "Section Name");
135
+ if (showSection)
136
+ {
137
+ EditorGUI.indentLevel++;
138
+ // section content
139
+ EditorGUI.indentLevel--;
140
+ }
141
+ ```
142
+
143
+ ## Common Patterns
144
+
145
+ **Button with action:**
146
+ ```csharp
147
+ if (GUILayout.Button("Do Something"))
148
+ {
149
+ // action here
150
+ }
151
+ ```
152
+
153
+ **Property field with label:**
154
+ ```csharp
155
+ EditorGUILayout.PropertyField(myProperty, new GUIContent("Label"));
156
+ ```
157
+
158
+ **Object reference field:**
159
+ ```csharp
160
+ myObject = (MyType)EditorGUILayout.ObjectField("Label", myObject, typeof(MyType), true);
161
+ ```
162
+
163
+ **Disabled group:**
164
+ ```csharp
165
+ EditorGUI.BeginDisabledGroup(condition);
166
+ // disabled elements
167
+ EditorGUI.EndDisabledGroup();
168
+ ```
169
+
170
+ ## Best Practices
171
+
172
+ - Use `SerializedObject` and `SerializedProperty` for undo support
173
+ - Cache property references in `OnEnable()`
174
+ - Use `EditorUtility.SetDirty()` only for non-serialized changes
175
+ - Use `Undo.RecordObject()` before modifying objects directly
176
+ - Use `EditorStyles` for consistent appearance
177
+ - Use `GUILayout.FlexibleSpace()` to push elements apart
178
+
179
+ See `references/templates.md` for complete script templates.
180
+ See `references/gui-elements.md` for full element reference.
@@ -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,217 @@
1
+ ---
2
+ name: ui-ugui
3
+ description: Understands, edits, and generates Unity uGUI Canvas hierarchies, RectTransforms, Layout Groups, and prefab UI. Use for requests involving Canvas, uGUI, RectTransform, or prefab UI files.
4
+ ---
5
+
6
+ Understand existing Unity uGUI, make targeted edits, and generate new Canvas-based hierarchies.
7
+
8
+ When working with ScrollRect/ScrollView, read the reference file:
9
+ - [references/scrollview-setup.md](references/scrollview-setup.md) — Required hierarchy, setup rules, and common failures
10
+
11
+ ## Scope
12
+
13
+ Determine what the user is asking for:
14
+
15
+ | Request Type | Action |
16
+ |--------------|--------|
17
+ | Question about UI | **Understand** — analyze hierarchy, explain structure |
18
+ | Change specific element | **Edit** — targeted modification only |
19
+ | Create new UI | **Generate** — create new hierarchy |
20
+ | Fix/improve existing UI | **Edit** — modify existing, don't rebuild |
21
+
22
+ **Generate only what is requested:**
23
+
24
+ | Request | Output |
25
+ |---------|--------|
26
+ | UI layout | Prefab or scene hierarchy only |
27
+ | "with code" / "with logic" / "functional" | Hierarchy + scripts |
28
+
29
+ **These do NOT imply scripts:**
30
+ - "proper buttons" → well-configured Button components
31
+ - "working UI" → valid hierarchy that renders
32
+ - "menu screen" → visual layout only
33
+
34
+ ## Critical Rules
35
+
36
+ **Namespace disambiguation:**
37
+ - Always use fully qualified type names when creating or referencing UI components
38
+ - `UnityEngine.UI.Image`, not `Image`
39
+ - `UnityEngine.UI.Button`, not `Button`
40
+ - Other namespaces in the project can cause ambiguous type errors
41
+
42
+ **Verify before modifying:**
43
+ - Always check what exists before making changes
44
+ - Confirm parent objects exist before adding children
45
+ - Verify components are present before modifying properties
46
+ - Never assume hierarchy state — query it first
47
+
48
+ **Incremental fixes over rebuilds:**
49
+ - When fixing issues, make targeted corrections
50
+ - Never destroy and recreate entire hierarchies to fix problems — destroyed objects cause null reference cascades
51
+ - Prefer identifying the specific broken property and fixing only that over rewriting large sections
52
+ - **When a fix fails, revert the change** before trying an alternative approach
53
+
54
+ **One change at a time:**
55
+ - Make a single change, then verify the result
56
+ - Do not batch multiple unrelated modifications
57
+ - Be careful not to inadvertently modify or remove adjacent elements when editing a specific one
58
+ - If something fails, understand why before trying alternatives
59
+ - Avoid "shotgun debugging" with multiple simultaneous changes
60
+
61
+ **Color and visibility:**
62
+ - **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)
63
+ - **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
64
+
65
+ **Specification adherence:**
66
+ - **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
67
+ - **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
68
+
69
+ ## Conventions
70
+
71
+ **Follow project patterns first.** Search existing files before applying defaults.
72
+
73
+ | Type | Convention | Good | Bad |
74
+ |------|------------|------|-----|
75
+ | GameObject names | PascalCase | `SubmitButton` | `submit-button` |
76
+ | Prefab paths | Feature folders | `Assets/UI/Inventory/` | `Assets/Prefabs/UI/` |
77
+
78
+ ## Workflow
79
+
80
+ 1. **Verify state** — Check what exists in the scene/hierarchy before any action.
81
+ 2. **Analyze** — Determine exactly what's needed. No extras.
82
+ 3. **Search** — Find existing prefabs, canvases, assets. Don't assume paths.
83
+ 4. **Follow project patterns** — Match folder structure and naming.
84
+ 5. **Create or edit** — Build structure with proper anchoring, or make targeted edits.
85
+ 6. **Confirm result** — Verify the change worked before moving on.
86
+
87
+ ## Canvas Setup
88
+
89
+ Every UI needs a Canvas:
90
+
91
+ ```
92
+ Canvas (Screen Space - Overlay or Camera)
93
+ ├── CanvasScaler (Scale With Screen Size recommended)
94
+ ├── GraphicRaycaster
95
+ └── [UI Content]
96
+ ```
97
+
98
+ **CanvasScaler settings:**
99
+ - 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)
100
+ - Reference Resolution: Match project standards (e.g., 1920x1080)
101
+ - When creating a Canvas with Screen Space - Camera, **read the camera's reference resolution** first
102
+ - Match Width Or Height: 0.5 (balanced)
103
+ - If an existing Canvas uses "Constant Pixel Size", flag it and ask the user before changing
104
+ - Prefer anchors and Layout Groups over absolute pixel positions for layout
105
+
106
+ ## Layout and anchoring
107
+
108
+ Layout Groups, Layout Elements, and RectTransform anchoring: [references/layout-and-anchors.md](references/layout-and-anchors.md).
109
+ ## Common Components
110
+
111
+ | Component | Use Case |
112
+ |-----------|----------|
113
+ | `Image` | Backgrounds, icons |
114
+ | `RawImage` | Render textures, videos |
115
+ | `Text (TMP)` | All text (use TextMeshPro) |
116
+ | `Button` | Clickable elements |
117
+ | `Toggle` | Checkboxes, radio buttons |
118
+ | `Slider` | Value ranges |
119
+ | `ScrollRect` | Scrollable content |
120
+ | `InputField (TMP)` | Text input |
121
+
122
+ ## Best Practices
123
+
124
+ - Use TextMeshPro for all text (not legacy Text)
125
+ - 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
126
+ - 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
127
+ - Organize hierarchy logically (Header, Content, Footer)
128
+ - Use Layout Groups instead of manual positioning where possible
129
+ - Set Raycast Target = false on non-interactive images
130
+ - Use sprite atlases for performance
131
+
132
+ **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.
133
+
134
+ **Do not use** `AssetDatabase.ImportPackage()` for TMP resources, instead `TMP_PackageResourceImporter.ImportResources()` is the canonical non-interactive API.
135
+
136
+ ## Interaction Readiness
137
+
138
+ Before completing any UI that contains interactive elements, verify:
139
+
140
+ 1. **EventSystem** must exist in the scene (exactly one)
141
+ 2. **GraphicRaycaster** must be on the Canvas
142
+ 3. **Raycast Target = true** on interactive elements (and false on non-interactive ones to avoid blocking)
143
+ 4. **Button.onClick should be wired** (via inspector or script) — only when scripts or logic were requested
144
+
145
+ If the first three are missing, interactive elements will exist visually but fail silently.
146
+
147
+ ## Understanding
148
+
149
+ When the user asks questions about existing UI:
150
+
151
+ **Read the hierarchy first.** Don't assume — always inspect the scene or prefab before answering.
152
+
153
+ **Analyze structure:**
154
+ - Identify the Canvas and its render mode
155
+ - Map the parent-child relationships
156
+ - Identify which Layout Groups control which children
157
+ - Check RectTransform anchor configurations
158
+
159
+ **Answer questions about:**
160
+ - "What does this button do?" → Explain component, hierarchy position, event wiring
161
+ - "How is this laid out?" → Describe Layout Groups, anchoring, hierarchy
162
+ - "Why is this invisible?" → Check size, anchors, parent bounds, component state
163
+ - "What controls this element's size?" → Trace Layout Group settings or anchors
164
+
165
+ ## Editing
166
+
167
+ For targeted changes to existing UI:
168
+
169
+ **Read before editing.** Always inspect the current state first.
170
+
171
+ **Edit workflow:**
172
+ 1. Verify the target object exists
173
+ 2. Identify the specific property or component to change
174
+ 3. Make the minimal change required
175
+ 4. Verify the result before proceeding
176
+
177
+ **Never destroy to fix:**
178
+ - Destroying objects cascades to null references elsewhere
179
+ - Fix properties in place rather than recreating
180
+ - If an element must be removed, update all references first
181
+
182
+ ## C# (Only When Requested)
183
+
184
+ - Use fully qualified UI types to avoid namespace conflicts
185
+ - Use `[SerializeField]` for inspector references
186
+ - Cache component references in Awake()
187
+ - Use events/delegates for button callbacks
188
+ - Place scripts in same folder as prefabs (follow project patterns)
189
+
190
+ **Component references:**
191
+ - Verify referenced objects exist before accessing them
192
+ - Handle cases where serialized references may be null
193
+ - When wiring up references, confirm the target component is present
194
+
195
+ ## Error Recovery
196
+
197
+ When something goes wrong:
198
+
199
+ **Stop and diagnose:**
200
+ - Identify the exact error or symptom
201
+ - Determine the root cause before attempting fixes
202
+ - Do not make speculative changes
203
+
204
+ **Fix incrementally:**
205
+ - Address one issue at a time
206
+ - Verify each fix before moving to the next
207
+ - Keep track of what was changed
208
+
209
+ **Avoid destructive patterns:**
210
+ - "Start fresh" strategies destroy working elements along with broken ones
211
+ - Rebuilding entire hierarchies creates more problems than it solves
212
+ - Prefer surgical fixes to wholesale replacements
213
+
214
+ **When stuck:**
215
+ - Re-verify the current state of the hierarchy
216
+ - Check if previous changes were actually applied
217
+ - Consider if the approach itself is wrong rather than the implementation