@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,55 @@
1
+ # Unity IAP Platform-Specific Notes
2
+
3
+ This file lists only the platform behavior agents commonly get wrong. For the extension APIs, setup steps and code samples, read the docs pages below before writing the code, and again if a step fails. Look up individual extension types in the package's `xrefmap.yml`. In API URLs, replace `<VERSION>` with the major.minor of `com.unity.purchasing` in `Packages/packages-lock.json`.
4
+
5
+ - [Apple App Store](https://docs.unity.com/en-us/iap/apple-store.md): promotional purchases, Ask-to-Buy, offer code redemption, App Account Token and storefront.
6
+ - [Use Google Play billing extensions](https://docs.unity.com/en-us/iap/use-google-play-billing-extensions.md): obfuscated IDs, subscription upgrade and downgrade, and deferred subscription changes.
7
+ - [Receipt validation](https://docs.unity.com/en-us/iap/receipt-validation.md): Google local validation and Apple server-side validation.
8
+ - [SubscriptionInfo class reference](https://docs.unity.com/en-us/iap/subscriptioninfo-class-reference.md): per-store behavior of each method.
9
+
10
+ ## Table of Contents
11
+
12
+ - [Apple App Store](#apple-app-store)
13
+ - [Google Play Store](#google-play-store)
14
+ - [SubscriptionInfo platform differences](#subscriptioninfo-platform-differences)
15
+ - [Cross-platform rules](#cross-platform-rules)
16
+
17
+ ## Apple App Store
18
+
19
+ - If you subscribe to `AppleStoreExtendedPurchaseService.OnPromotionalPurchaseIntercepted`, you MUST eventually call `ContinuePromotionalPurchases()`, because otherwise the promotional purchase hangs indefinitely.
20
+ - Ask-to-Buy purchases arrive through `store.OnPurchaseDeferred`. Show a "pending approval" state and don't grant content, because the purchase arrives later through `OnPurchasePending` if a parent approves it, or fails if they decline.
21
+ - To test Ask-to-Buy in the sandbox, set `AppleStoreExtendedPurchaseService.simulateAskToBuy = true`. Remove it before release.
22
+ - Handle `OnEntitlementRevoked` (for example after a refund) by removing the content. It receives the product ID as a `string`.
23
+ - Check `AppleStoreExtendedService.canMakePayments` before showing a store, because parental controls can block payments.
24
+ - Apple non-renewable subscriptions can't be restored through `RestoreTransactions`. Track them server-side.
25
+
26
+ ## Google Play Store
27
+
28
+ - `UpgradeDowngradeSubscription` takes the player's current subscription `Order`, the new `Product`, and a `GooglePlayReplacementMode`. Read the [GooglePlayReplacementMode API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.GooglePlayReplacementMode.html) page to pick the mode that matches the user's billing intent, and confirm the choice with the user, because each mode charges the player differently.
29
+ - Pass hashed values to `SetObfuscatedAccountId` and `SetObfuscatedProfileId`, never raw user IDs, because Google rejects personally identifiable values.
30
+ - `OnDeferredPaymentUntilRenewalDate` is on `GooglePlayStoreExtendedPurchaseService`, not on `StoreController`.
31
+
32
+ ## SubscriptionInfo platform differences
33
+
34
+ | Method | Apple | Google |
35
+ |---|---|---|
36
+ | `GetPurchaseDate()` | Returns the **most recent renewal** date | Returns the **original purchase** date |
37
+ | `GetCancelDate()` | Returns the cancellation date | Returns `DateTime.MinValue` (not supported) |
38
+
39
+ Check `IsSubscribed()` first. A `Result.Unsupported` result means the platform doesn't provide that information.
40
+
41
+ ## Cross-platform rules
42
+
43
+ - Platform extension services are `null` on other platforms and in the Editor:
44
+
45
+ | Extension | iOS | Android | Editor |
46
+ |---|---|---|---|
47
+ | `AppleStoreExtendedService` | Available | `null` | `null` |
48
+ | `AppleStoreExtendedPurchaseService` | Available | `null` | `null` |
49
+ | `GooglePlayStoreExtendedService` | `null` | Available | `null` |
50
+ | `GooglePlayStoreExtendedPurchaseService` | `null` | Available | `null` |
51
+
52
+ Null-check each one with `if` before use, because `?.` doesn't work with `+=`.
53
+ - Add a "Restore Purchases" button on iOS that calls `store.RestoreTransactions()`, because Apple's review guidelines require it.
54
+ - Check subscription status at every app launch, not only at purchase time, because subscriptions can expire or be cancelled outside the app.
55
+ - Test with Apple sandbox accounts and Google license testing accounts, so test purchases aren't charged.
@@ -0,0 +1,207 @@
1
+ # Pre-Check: Project Scan and Path Routing
2
+
3
+ Links to other reference files point to files in this `references/` folder. Any other relative paths resolve to the skill directory.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Ambiguous Intent](#ambiguous-intent)
8
+ - [IAP D2C Capabilities (Direct-to-Customer, Third-Party Payment Provider)](#iap-d2c-capabilities-direct-to-customer-third-party-payment-provider)
9
+ - [Scan Order (standard IAP paths)](#scan-order-standard-iap-paths)
10
+ - [Routing Summary](#routing-summary)
11
+
12
+ Scan steps: [1 — Third-Party IAP Package Check](#1--third-party-iap-package-check-highest-priority) · [2 — Native Google Billing](#2--native-google-billing-check) · [2b — Native iOS StoreKit](#2b--native-ios-storekit-check) · [3 — Unity IAP v4](#3--unity-iap-v4-check) · [4 — Unity IAP v5 Already Installed](#4--unity-iap-v5-already-installed) · [5 — No IAP Detected](#5--no-iap-detected)
13
+ Third-party sub-checks: [1a Essential Kit](#1a--essential-kit-conversion-supported) · [1b UniPay](#1b--unipay-assessment-path) · [1c RevenueCat](#1c--revenuecat-assessment-path) · [1d Adapty](#1d--adapty-assessment-path)
14
+
15
+ Run this scan before doing anything else. Do not read any other reference file or make any changes until routing is resolved.
16
+
17
+ ## Ambiguous Intent
18
+
19
+ If the user's prompt does not clearly indicate which billing backend they want — for example:
20
+
21
+ - "Add a StoreController for me"
22
+ - "Add a purchase manager"
23
+ - "Set up IAP"
24
+ - "Help me add in-app purchases"
25
+ - "Upgrade to latest IAP"
26
+
27
+ **Stop and ask before scanning or routing:**
28
+
29
+ > "Would you like to implement purchasing using:
30
+ > - **Apple App Store / Google Play** (standard platform billing), or
31
+ > - **IAP D2C Capabilities** (third-party payment provider such as Stripe or Coda via Unity Cloud)?"
32
+
33
+ Do not assume a default. Route only after the user confirms their intent.
34
+
35
+ ---
36
+
37
+ ## IAP D2C Capabilities (Direct-to-Customer, Third-Party Payment Provider)
38
+
39
+ If the user explicitly asks for IAP D2C Capabilities, Stripe/Coda payment integration, or a third-party payment provider, **do not follow the standard scan order below**. Instead:
40
+
41
+ - If the project has IAP v4, native Google Billing, or a third-party IAP package → resolve those blockers first using the standard scan order, then return here.
42
+ - If the project has no IAP, or has `com.unity.purchasing` **v5.4+** → route to [path-implement-iap-d2c.md](path-implement-iap-d2c.md).
43
+ - If the project has `com.unity.purchasing` **v5.0–5.3** → inform the user that IAP D2C Capabilities require v5.4+, instruct them to upgrade via Package Manager, and continue once the upgrade is confirmed.
44
+
45
+ ---
46
+
47
+ ## Scan Order (standard IAP paths)
48
+
49
+ Run scans in this exact order. The first match wins — stop scanning and route immediately.
50
+
51
+ ---
52
+
53
+ ### 1 — Third-Party IAP Package Check (highest priority)
54
+
55
+ #### 1a — Essential Kit (conversion supported)
56
+
57
+ Search `Packages/manifest.json` and `Packages/packages-lock.json` for `com.voxelbusters.essentialkit`.
58
+
59
+ **If found → only one path is valid:**
60
+
61
+ > Route to [convert-essentialkit.md](convert-essentialkit.md)
62
+
63
+ Inform the user that Essential Kit was detected and that the conversion path will be used. Do not offer any other path.
64
+
65
+ ---
66
+
67
+ #### 1b — UniPay (assessment path)
68
+
69
+ Search `Packages/manifest.json`, `Packages/packages-lock.json`, and `Assets/Plugins/` for UniPay signals:
70
+
71
+ ```
72
+ com\.flobuk\.unipay|UniPay|Assets/Plugins/UniPay|Assets/Plugins/SIS
73
+ ```
74
+
75
+ **If found → only one path is valid:**
76
+
77
+ > Route to [convert-unipay.md](convert-unipay.md)
78
+
79
+ Inform the user that UniPay was detected and that the assessment path will be used. Do not offer any other path.
80
+
81
+ ---
82
+
83
+ #### 1c — RevenueCat (assessment path)
84
+
85
+ Search `Packages/manifest.json` and `Packages/packages-lock.json` for `com.revenuecat.purchases-unity`.
86
+
87
+ **If found → only one path is valid:**
88
+
89
+ > Route to [convert-revenuecat.md](convert-revenuecat.md)
90
+
91
+ Inform the user that RevenueCat was detected and that the assessment path will be used. Do not offer any other path.
92
+
93
+ ---
94
+
95
+ #### 1d — Adapty (assessment path)
96
+
97
+ Search `Packages/manifest.json`, `Packages/packages-lock.json`, and `Assets/` for Adapty signals:
98
+
99
+ ```
100
+ com\.adapty|Assets/Adapty|AdaptySDK
101
+ ```
102
+
103
+ **If found → only one path is valid:**
104
+
105
+ > Route to [convert-adapty.md](convert-adapty.md)
106
+
107
+ Inform the user that Adapty was detected and that the assessment path will be used. Do not offer any other path.
108
+
109
+ ---
110
+
111
+ ### 2 — Native Google Billing Check
112
+
113
+ Search the following locations:
114
+
115
+ - `Assets/**/*.cs` for: `AndroidJavaObject|AndroidJavaClass|BillingClient|BillingManager|GoogleBilling|BillingBridge`
116
+ - `Assets/Plugins/Android/**/*.java`, `*.kt` for: `com\.android\.billingclient`
117
+ - `mainTemplate.gradle`, `launcherTemplate.gradle`, `baseProjectTemplate.gradle` for: `com\.android\.billingclient:billing`
118
+
119
+ **If found → only one path is valid:**
120
+
121
+ > Route to [path-convert-native-google-billing.md](path-convert-native-google-billing.md)
122
+
123
+ Inform the user that native Google Billing was detected and that the conversion path will be used. If `com.unity.purchasing` is absent or not the latest stable version, instruct the user to install or upgrade to the latest stable version via Package Manager before proceeding.
124
+
125
+ Do not offer any other path.
126
+
127
+ ---
128
+
129
+ ### 2b — Native iOS StoreKit Check
130
+
131
+ Search the following for native StoreKit signals:
132
+
133
+ - `Assets/Plugins/iOS/**/*.m`, `*.mm`, `*.h`, `*.swift` for: `SKProductsRequest|SKPaymentQueue|SKPaymentTransaction|SKPaymentTransactionObserver|Product\.products|Transaction\.currentEntitlements`
134
+ - `Assets/**/*.cs` for: `DllImport.*__Internal` combined with IAP-related method names, or `UnitySendMessage` calls associated with StoreKit
135
+
136
+ **If found → only one path is valid:**
137
+
138
+ > Route to [path-convert-native-storekit.md](path-convert-native-storekit.md)
139
+
140
+ Inform the user that a native iOS StoreKit plugin was detected and that the conversion path will be used. If `com.unity.purchasing` is absent or not the latest stable version, instruct the user to install or upgrade via Package Manager before proceeding.
141
+
142
+ Do not offer any other path.
143
+
144
+ ---
145
+
146
+ ### 3 — Unity IAP v4 Check
147
+
148
+ Search `Packages/manifest.json` for `com.unity.purchasing` with a version matching `4\.`.
149
+
150
+ Also search `Assets/**/*.cs` for legacy v4 API patterns:
151
+
152
+ ```
153
+ IStoreListener|UnityPurchasing\.Initialize|ConfigurationBuilder
154
+ ```
155
+
156
+ **If found → only one path is valid:**
157
+
158
+ > Route to [migration-v4-to-v5.md](migration-v4-to-v5.md)
159
+
160
+ Inform the user that Unity IAP v4 was detected and that the v4→v5 migration path will be used. Do not offer any other path.
161
+
162
+ ---
163
+
164
+ ### 4 — Unity IAP v5 Already Installed
165
+
166
+ If none of the above matched, search `Packages/manifest.json` for `com.unity.purchasing` with a version matching `5\.`:
167
+
168
+ **If found → inform the user:**
169
+
170
+ > "This project already has Unity IAP v5 installed. You can extend the existing setup — for example, add new products, add platform-specific features, or integrate IAP D2C Capabilities. What would you like to do?"
171
+
172
+ Then route based on the user's answer. Do not automatically route to the new-project path — the project already has IAP configured.
173
+
174
+ ---
175
+
176
+ ### 5 — No IAP Detected
177
+
178
+ If none of the above matched and `com.unity.purchasing` is absent from `manifest.json`:
179
+
180
+ **→ only one path is valid:**
181
+
182
+ > Route to [path-add-iap-to-new-project.md](path-add-iap-to-new-project.md)
183
+
184
+ ---
185
+
186
+ ## Routing Summary
187
+
188
+ | What is detected | Valid path |
189
+ |---|---|
190
+ | Essential Kit (`com.voxelbusters.essentialkit`) | Convert Essential Kit billing → IAP 5 — see convert-essentialkit.md |
191
+ | UniPay (FLOBUK) | Assessment — see convert-unipay.md |
192
+ | RevenueCat | Assessment — see convert-revenuecat.md |
193
+ | Adapty | Assessment — see convert-adapty.md |
194
+ | Native Google BillingClient | Convert native Google Billing → IAP 5 — see path-convert-native-google-billing.md |
195
+ | Native iOS StoreKit plugin (`SKPaymentQueue` / `DllImport("__Internal")`) | Convert native StoreKit → IAP 5 — see path-convert-native-storekit.md |
196
+ | `com.unity.purchasing` v4 or v4 API patterns | Migrate IAP v4 → v5 |
197
+ | `com.unity.purchasing` v5 already installed | Ask user what to extend — do not auto-route |
198
+ | No IAP detected | Add Unity IAP 5 to new project |
199
+ | User explicitly requests IAP D2C Capabilities / payment provider | See IAP D2C Capabilities section above |
200
+
201
+ ---
202
+
203
+ ## Also check: Codeless catalog presence
204
+
205
+ Regardless of which route above wins, check whether `Assets/Resources/IAPProductCatalog.json` exists. This is the **Codeless IAP** catalog and is independent of the routing decision — but if it is present and `enableCodelessAutoInitialization` is true, adding a scripted `StoreController` creates a race condition with `CodelessIAPStoreListener`.
206
+
207
+ Surface the catalog's presence and auto-init flag to the user before generating scripted IAP code. See [codeless-catalog.md](codeless-catalog.md) for the race condition details and the three mitigation options.
@@ -0,0 +1,46 @@
1
+ # Full topic map
2
+
3
+ Before you go forward with a workflow or diagnosis:
4
+
5
+ 1. Open and read the [documentation page(s)](#full-topic-map) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
6
+ 2. Name the file(s) you read in your response.
7
+
8
+ This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.
9
+
10
+ Prefer `WebFetch` over `WebSearch` — faster and lands on the exact reference. Only fetch what you need.
11
+
12
+ In docs.unity3d.com URLs, replace `<VERSION>` with the major.minor of `com.unity.purchasing` in `Packages/packages-lock.json` before fetching. The IAP manual pages on docs.unity.com aren't versioned, so use those URLs as written.
13
+
14
+ - [Unity In-App Purchasing](https://docs.unity.com/en-us/iap.md): overview of the IAP manual and its sections.
15
+ - [Initialize Unity IAP](https://docs.unity.com/en-us/iap/set-up-in-app-purchasing.md): install and initialize, with `StoreController` and D2C (`PaymentProvider.Name`, `RemoteCatalogProvider`) samples.
16
+ - [Create your catalog programmatically](https://docs.unity.com/en-us/iap/code-catalog.md): define products with `CatalogProvider` and store-specific IDs.
17
+ - [Purchases](https://docs.unity.com/en-us/iap/purchases.md): process pending purchases, confirm them, handle failed confirmations, and determine purchase status.
18
+ - [Restore purchases](https://docs.unity.com/en-us/iap/restore-purchases.md): restore behavior on Google Play and Apple platforms.
19
+ - [Receipt validation](https://docs.unity.com/en-us/iap/receipt-validation.md): local and server-side validation, and the receipt structure.
20
+ - [SubscriptionInfo class reference](https://docs.unity.com/en-us/iap/subscriptioninfo-class-reference.md): every `SubscriptionInfo` method and its per-store behavior.
21
+ - [Apple App Store](https://docs.unity.com/en-us/iap/apple-store.md): configure IAP for iOS, macOS and tvOS.
22
+ - [Use Google Play billing extensions](https://docs.unity.com/en-us/iap/use-google-play-billing-extensions.md): obfuscated IDs and deferred subscription changes.
23
+ - [Set up Codeless IAP](https://docs.unity.com/en-us/iap/codeless-iap.md): the IAP Catalog window, IAP buttons and automatic initialization.
24
+ - [Upgrade from IAP v4 to v5](https://docs.unity.com/en-us/iap/upgrade-to-iap-v5.md): the official v4 to v5 API mapping.
25
+ - [Integrate D2C payment providers workflow](https://docs.unity.com/en-us/iap/payment-providers/workflow.md): the D2C setup workflow for Stripe and Coda.
26
+ - [Initiate a purchase](https://docs.unity.com/en-us/iap/payment-providers/initiate-purchase.md): D2C eligibility checks and the Purchase Options UI.
27
+ - [Deep link success URL example](https://docs.unity.com/en-us/iap/payment-providers/success-deep-link.md): redirect players back to the app after D2C checkout.
28
+ - [Test mode for D2C payments](https://docs.unity.com/en-us/iap/payment-providers/test-mode.md): simulate D2C purchases before a provider account is connected.
29
+ - [Comply with Apple and Google external purchase requirements](https://docs.unity.com/en-us/iap/payment-providers/external-purchase-compliance.md): compliance checks, checkout URLs and transaction tokens.
30
+ - [Add a routing rule](https://docs.unity.com/en-us/iap/payment-providers/routing.md): choose which payment providers players see.
31
+ - [Create your Remote Catalog](https://docs.unity.com/en-us/iap/payment-providers/configure-remote-catalog.md): `.ucat` and `.catalog.csv` catalog items and deployment.
32
+
33
+ ## API reference
34
+
35
+ The API is `UnityEngine.Purchasing`, part of the `com.unity.purchasing` package. It is versioned by package version, not Unity version, so check the project's installed package version before relying on a specific class or method.
36
+
37
+ 1. Use the `unity-cli` skill to check the installed package version.
38
+ 2. Fetch and cache `https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/xrefmap.yml`, replacing `<VERSION>` with the installed package's major.minor. This file maps every public API member's fully qualified name to its docs page `href`. Append the `href` to the same base URL, so `href: api/UnityEngine.Purchasing.StoreController.html` becomes `https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.StoreController.html`.
39
+ 3. Grep the yml file locally for a class or method instead of refetching per lookup. Don't read the whole file.
40
+
41
+ Always fetch the version matching the installed package rather than relying on training knowledge, since APIs are frequently marked obsolete between major versions (e.g. the v4 `UnityPurchasing` class is obsolete in v5).
42
+
43
+ Most-used pages:
44
+
45
+ - [StoreController API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.StoreController.html): every `StoreController` method, event and property, with signatures.
46
+ - [EntitlementStatus API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.EntitlementStatus.html): the entitlement status values.
@@ -0,0 +1,109 @@
1
+ ---
2
+ name: initialize-ai-navigation
3
+ description: Sets up and configures Unity AI Navigation, including NavMesh surfaces, agents, obstacles, and links. Use when the user asks about navigation meshes, pathfinding, patrol routes, or obstacle avoidance.
4
+ ---
5
+
6
+ Determine what the user needs and guide them through navigation setup. See [navigation-system.md](references/navigation-system.md) for expanded component details, API notes, code recipes, and troubleshooting.
7
+
8
+ ## Important
9
+
10
+ - Use the unity cli (`unity command --format json`) and the `unity-cli` and `unity-pipeline` skills for each step.
11
+ - Before making changes, establish a baseline of the current behavior so you can tell whether a later result is actually caused by your change.
12
+ - Create a restore point you can roll back to if your changes fail.
13
+ - Do only what's asked. Don't change unrelated assets or files.
14
+ - Never leave verification code in the user's script. Never build logging or detection they didn't ask for. See [Final step](#final-step).
15
+ - Avoid long explanations.
16
+
17
+ ## Full topic map
18
+
19
+ Documentation pages and API entry points: [references/topic-map.md](references/topic-map.md).
20
+ ## Routing Logic
21
+
22
+ | User Says | Interpretation |
23
+ |-----------|---------------|
24
+ | "add navigation" / "set up nav" | Full setup: NavMeshSurface + bake + NavMeshAgent |
25
+ | "make this character navigate" | Add NavMeshAgent, ensure NavMesh exists |
26
+ | "add pathfinding" | NavMeshAgent + movement script |
27
+ | "agent won't move" / "path not found" | Troubleshoot — see Troubleshooting Decision Tree in reference |
28
+ | "avoid obstacles" | NavMeshObstacle with carving or avoidance |
29
+ | "connect two areas" / "jump across" | NavMeshLink between areas |
30
+ | "patrol between points" | NavMeshAgent + patrol script |
31
+ | "click to move" | NavMeshAgent + raycast click-to-move script |
32
+ | "animate the character while navigating" | Couple Animator with NavMeshAgent |
33
+ | "different agent sizes" | Configure agent types in Navigation window |
34
+ | "areas and costs" / "restrict areas" | NavMesh area types, modifiers, and agent area masks |
35
+
36
+ ## Workflow
37
+
38
+ ### 0. Package Installation Check
39
+ Before doing anything else, verify that `com.unity.ai.navigation` is installed. If it's missing,
40
+ add it to `Packages/manifest.json` under `dependencies` — Unity resolves it when the Editor next
41
+ regains focus, and this needs no Editor connection:
42
+
43
+ ```json
44
+ "com.unity.ai.navigation": "<current 2.x version>"
45
+ ```
46
+
47
+ Don't invent the version string, and don't copy another package's version, because package
48
+ versions are independent. You must read the latest 2.x version from the Unity registry:
49
+ `https://packages.unity.com/com.unity.ai.navigation` lists every published version. Use version 2.0.16 when in doubt.
50
+
51
+ Proceed only once it's confirmed installed. If you have a live Editor to run C# in, see
52
+ [navigation-system.md](references/navigation-system.md) for the `Client.Add` equivalent.
53
+
54
+ ### 1. Pre-Flight: Assess Current Navigation Setup
55
+ Before making changes, inspect what already exists:
56
+ 1. Find the existing navigation components. With a connected Editor, query the live scene for
57
+ `NavMeshSurface`, `NavMeshAgent`, `NavMeshObstacle`, `NavMeshLink` and `NavMeshModifier` — see
58
+ the `unity-cli` skill for driving a running Editor. Without one, search the scene and prefab
59
+ files for those component names.
60
+ 2. List the configured agent types. With a connected Editor, loop over
61
+ `UnityEngine.AI.NavMesh.GetSettingsCount()` and `GetSettingsByIndex(i)`, and name each with
62
+ `GetSettingsNameFromID(settings.agentTypeID)`. Without one, read the `m_SettingNames` section in `ProjectSettings/NavMeshAreas.asset`.
63
+ 3. Summarize ALL detected navigation components before proposing changes.
64
+
65
+ ### 2. Gather Missing Information
66
+ Before creating components, ensure the user has specified: walkable surfaces, agent type/size, agent behavior, obstacles, links, and area/cost requirements. Ask if anything is unclear. See the Information Gathering Checklist in the reference for full details.
67
+
68
+ ### 3. Planning & Execution
69
+ Follow this general order. See the Component Setup Guide in the reference for detailed step-by-step instructions per component:
70
+ 1. **NavMesh Surface** — create the walkable mesh (bake it)
71
+ 2. **NavMesh Agent** — add pathfinding characters
72
+ 3. **NavMesh Obstacle** — add dynamic obstacles
73
+ 4. **NavMesh Link** — connect disconnected NavMesh areas
74
+ 5. **NavMesh Modifier / Modifier Volume** — fine-tune area types
75
+ 6. **Scripts** — movement, patrol, click-to-move, animation coupling (see Common Recipes in reference)
76
+
77
+ ### 4. Validation
78
+ After setup, read these values with `eval` (fully qualified) rather than checking the Scene view by eye, because a NavMesh that looks right can still be missing or mismatched:
79
+
80
+ 1. Each `NavMeshSurface` has baked data: `navMeshData` isn't null.
81
+ 2. Each `NavMeshSurface.agentTypeID` matches the `NavMeshAgent.agentTypeID` of the agents that walk on it.
82
+ 3. Each agent can reach its destination: `agent.CalculatePath` to the target returns `true`, and the path's `status` is `PathComplete`. Use `NavMesh.CalculatePath(Vector3, Vector3, NavMeshQueryFilter, NavMeshPath)` if you check paths when a NavMeshAgent is not available.
83
+ 4. `NavMeshObstacle.carving` is on for NavMeshObstacle components that stay still in the scene or are expected to move slowly, and off for those expected to move fast.
84
+ 5. Each `NavMeshLink` has `activated` set to `true`, and `NavMesh.SamplePosition` finds the NavMesh within a short distance of both ends.
85
+ 6. Each agent's `areaMask` includes every area it must cross.
86
+ 7. No conflicting components (see Mixing Components Guide in reference).
87
+ 8. If a NavMeshAgent's GameObject has a Rigidbody, `isKinematic` is `true`.
88
+
89
+ If a check fails, fix it and run the checks again before the Final step.
90
+
91
+ ## Final step
92
+
93
+ Do the following checks:
94
+
95
+ 1. Check the project has zero console errors. Use `console_status` for counts.
96
+ 2. Stop there unless the user asked you to prove it works or you suspect a specific fault.
97
+ 3. If you do enter Play mode, do it once only to chase a fault you already suspect. Read the world through `eval` rather than adding logging, for example each agent's `pathStatus` and `remainingDistance` to see whether it reaches its destination. Take no screenshots as they take too much time.
98
+
99
+ If a check fails, go back and reread the [docs pages](#full-topic-map) to find out what you missed.
100
+
101
+ ## Final report
102
+
103
+ Summarize what was created or changed:
104
+ - NavMesh Surfaces: which GameObject, agent type, geometry mode, bake status
105
+ - NavMesh Agent(s): which GameObject, speed, stopping distance, area mask
106
+ - NavMesh Obstacle(s): which GameObject, shape, carve on/off
107
+ - NavMesh Link(s): start/end, bidirectional, area type
108
+ - Scripts: which scripts attached to which GameObjects
109
+ - Any manual steps required (adjust waypoints, re-bake after scene changes, etc.)