@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,117 @@
1
+ ---
2
+ name: generate-editor-search-query
3
+ description: Generates Unity Search queries and opens the Search window to find assets or scene objects. Use when the user asks to find, filter, or list assets, GameObjects, components, or references in the Editor, not on disk.
4
+ enabled: true
5
+ modes: [agent, ask]
6
+ ---
7
+
8
+ Translate natural-language Unity Editor search requests into useful Unity Search queries, explain them briefly, and open the Unity Search window with the query when appropriate.
9
+
10
+ ## Default Behavior
11
+
12
+ If the prompt explicitly says Unity Search, Quick Search, Search window, open Search, or asks for a Unity Search query, handle the search request with this skill even when the target belongs to another domain such as lighting, UI, physics, audio, or animation.
13
+
14
+ For requests such as "find", "search", "locate", "list", "filter", "look up", "where is", "which assets use", or "what references" concrete Unity assets or scene objects:
15
+
16
+ 1. Determine whether the request is primarily about project assets, scene objects, or both.
17
+ 2. Build one concise Unity Search query.
18
+ 3. Show the query in the response before or while opening Search.
19
+ 4. Open Unity Search by running the Editor-side snippet unless the user explicitly asks for query text only.
20
+ 5. If opening Search fails, return the query and tell the user to paste it into Unity Search manually.
21
+
22
+ Do not open Search when the user says "do not open Search", "query only", "what query should I use", "just give me the query", or similar.
23
+
24
+ If the user asks for a general explanation, project overview, folder-structure summary, architecture walkthrough, gameplay-system summary, or "how do I" programming answer, do not use this skill unless the prompt explicitly asks for Unity Search, a Search query, or opening the Search window.
25
+
26
+ If the user refers to "this", "selected", or "current" without an attached asset, scene object, visible name, or path, ask for the name/path instead of inventing one.
27
+
28
+ ## Scope
29
+
30
+ Scope read-only Unity Search / Quick Search queries to:
31
+
32
+ - project assets such as materials, textures, prefabs, scenes, scripts, shaders, audio clips, sprites, meshes, models, animations, fonts, render textures, and ScriptableObject assets
33
+ - scene objects and components such as Cameras, Lights, Rigidbodies, Colliders, Renderers, Canvas objects, UI components, ParticleSystems, AudioSources, Animators, Terrain objects, and named GameObjects
34
+ - path, label, type, filename, keyword, and reference-oriented asset searches
35
+ - selected or named assets when the name/path is available from the conversation or attachment
36
+
37
+ Do not install packages, run menu commands, edit assets, modify scenes, search external documentation, search repository text, inspect build logs, delete results, fix search results, or perform dependency graph analysis. If the user asks to act on results, first open Search or provide the query, then ask for confirmation before any separate modifying skill or workflow.
38
+
39
+ ## References
40
+
41
+ Before generating non-trivial queries, read [references/query-patterns.md](references/query-patterns.md).
42
+
43
+ Before opening the Search window, read [references/open-search-window.md](references/open-search-window.md).
44
+
45
+ Official English references:
46
+
47
+ - [Unity Search](https://docs.unity3d.com/Manual/search-overview.html)
48
+ - [Search expressions](https://docs.unity3d.com/Manual/search-expressions.html)
49
+ - [SearchService.ShowWindow](https://docs.unity3d.com/6000.0/Documentation/ScriptReference/Search.SearchService.ShowWindow.html)
50
+
51
+ ## Passing C# to `script eval`
52
+
53
+ `script eval` compiles a **statement block, not a file**. Two consequences, both compile errors:
54
+
55
+ - **No `using` directives.** The compiler reads `using UnityEditor;` as a resource-disposal
56
+ statement and rejects it (`CS0210`).
57
+ - **Types must be fully qualified.** A bare `SearchService` does not resolve (`CS0246`), and a
58
+ bare `Object` is ambiguous with `object` (`CS0104`).
59
+
60
+ The `unity-cli` skill owns the prerequisites — installing the CLI, confirming a connected Editor,
61
+ adding the project's `com.unity.pipeline` package, and discovering the command catalog. You need
62
+ `script eval` in particular; if it is absent, generate the query text and say the window can't be opened.
63
+
64
+ ## Query Generation Rules
65
+
66
+ Use the simplest query that is likely to produce the requested result.
67
+
68
+ - Prefer type filters for asset and component requests, such as `t:material`, `t:texture`, `t:prefab`, `t:scene`, `t:script`, `t:shader`, `t:Light`, or `t:Rigidbody`.
69
+ - Preserve user-provided names and keywords as plain query terms unless they need quoting.
70
+ - Use `dir:` when the user gives a folder or says "in Assets/..." or "under ...".
71
+ - Use `l:` when the user asks for a Unity asset label.
72
+ - Use `ref=` when the user asks what references, uses, depends on, contains, or is connected to an asset.
73
+ - Use Search expressions only when they clearly improve the query, such as `t:prefab ref={t:texture}` or `t:scene ref={t:prefab}`.
74
+ - For selected/current wording, use the known selected asset name or path only if it is present in the chat context; otherwise ask for it.
75
+ - For broad relationship requests such as "where is Rigidbody used", use a simple keyword or component query first, then mention that a scripted audit is separate if the user needs exhaustive code/property analysis.
76
+ - For requests that mix Search with repair work, generate and open the query first; do not modify results unless the user explicitly confirms a separate follow-up action.
77
+ - Do not invent unsupported filters for uncertain requests. If a request cannot be expressed reliably with Unity Search syntax, open the closest safe query and state the limitation.
78
+
79
+ ## Opening Unity Search
80
+
81
+ Run C# in the Editor only to open the Search window. This is an Editor UI action and must not change project assets or scene contents.
82
+
83
+ When opening Search:
84
+
85
+ 1. Base64-encode the query (UTF-8) and embed only the base64 text in the generated C# string, decoding it back to a string inside the snippet.
86
+ 2. Prefer asset and scene providers for this v1 skill.
87
+ 3. Fall back to active providers if a provider is unavailable.
88
+ 4. Log the query that was opened.
89
+ 5. Never claim Search opened if the command failed.
90
+
91
+ ## Response Format
92
+
93
+ Keep the user-facing response short:
94
+
95
+ ```text
96
+ Query: `t:material`
97
+ Opened Unity Search with that query.
98
+ ```
99
+
100
+ If not opening Search:
101
+
102
+ ```text
103
+ Query: `t:prefab ref={t:texture}`
104
+ Paste this into Unity Search.
105
+ ```
106
+
107
+ If the request is ambiguous but still searchable, choose the most likely query and mention the assumption. Ask a question only when the search target cannot be inferred, such as "find the thing" with no asset, scene, type, name, or context.
108
+
109
+ ## Validation Checklist
110
+
111
+ Before reporting success:
112
+
113
+ - the generated query is shown to the user
114
+ - the query targets assets, scene objects, or both
115
+ - Search was opened only when the user did not opt out
116
+ - any fallback or uncertainty is stated plainly
117
+ - no asset, scene, package, project setting, or search result was modified
@@ -0,0 +1,70 @@
1
+ # Open Unity Search Window
2
+
3
+ Use this pattern when the skill should open Unity Search pre-populated with a generated query.
4
+
5
+ This is a read-only Editor UI action. It must not create, modify, delete, import, install, or save anything.
6
+
7
+ ## Editor-side snippet
8
+
9
+ Base64-encode the generated Unity Search query (UTF-8) and embed only the base64 text, decoding it
10
+ back to a string inside the snippet. Never embed the raw query text in the C# string or in the
11
+ shell command: a query containing `"` would break out of a verbatim C# string, and a query
12
+ containing `'` would break the shell's single-quoting around `--code`. Base64's alphabet
13
+ (`A-Z a-z 0-9 + / =`) cannot close either quote, so it stays safe in both places at once.
14
+
15
+ Encode it without putting the raw query on a command line either. Write the query to a
16
+ temporary file with your file-writing tool (not with `echo` or a shell variable), then encode
17
+ that file, stripping the newline `base64` adds:
18
+
19
+ ```sh
20
+ base64 < query.txt | tr -d '\n'
21
+ ```
22
+
23
+ Delete the temporary file afterwards.
24
+
25
+ Replace `QUERY_BASE64` with that output.
26
+
27
+ Run it through the Editor with `unity command script eval --caller plugin --skill generate-editor-search-query --code '<snippet>'`. Fully qualified, with no
28
+ `using` directives, because `script eval` compiles a statement block rather than a file.
29
+
30
+ ```csharp
31
+ var query = System.Text.Encoding.UTF8.GetString(System.Convert.FromBase64String("QUERY_BASE64"));
32
+
33
+ var candidates = new[]
34
+ {
35
+ UnityEditor.Search.SearchService.GetProvider("asset"),
36
+ UnityEditor.Search.SearchService.GetProvider("scene")
37
+ };
38
+ var preferredProviders = System.Linq.Enumerable.ToArray(
39
+ System.Linq.Enumerable.Where(candidates, provider => provider != null));
40
+
41
+ var context = preferredProviders.Length > 0
42
+ ? new UnityEditor.Search.SearchContext(preferredProviders, query)
43
+ : new UnityEditor.Search.SearchContext(UnityEditor.Search.SearchService.GetActiveProviders(), query);
44
+
45
+ UnityEditor.Search.SearchService.ShowWindow(context);
46
+ return $"Opened Unity Search with query: {query}";
47
+ ```
48
+
49
+ ## Fallback Behavior
50
+
51
+ If compilation or execution fails:
52
+
53
+ 1. Do not claim Search opened.
54
+ 2. Show the query to the user.
55
+ 3. Tell the user to paste it into Unity Search manually.
56
+ 4. If the error indicates `UnityEditor.Search` is unavailable, say the project/editor version may not expose the Modern Search API used by the opener.
57
+
58
+ ## Provider Choice
59
+
60
+ For v1, prefer the `asset` and `scene` providers because this skill is scoped to project assets and scene objects.
61
+
62
+ Use active providers only as a fallback when one or both preferred providers are unavailable.
63
+
64
+ ## Safety Rules
65
+
66
+ - Do not call APIs that act on search results.
67
+ - Do not select, ping, rename, delete, move, import, or edit results.
68
+ - Do not save assets or scenes.
69
+ - Do not create project scripts or editor windows.
70
+ - Do not run package, menu, settings, or dependency searches as v1 behavior.
@@ -0,0 +1,124 @@
1
+ # Unity Search Query Patterns
2
+
3
+ Use these patterns to translate common natural-language requests into Unity Search queries. Keep queries simple unless the user asks for a more complex relationship.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Asset Queries](#asset-queries)
8
+ - [Reference Queries](#reference-queries)
9
+ - [Scene Queries](#scene-queries)
10
+ - [Natural-Language Mapping](#natural-language-mapping)
11
+ - [Mixed Asset And Scene Queries](#mixed-asset-and-scene-queries)
12
+ - [Unsupported Or Risky Requests](#unsupported-or-risky-requests)
13
+ - [Query Quality Rules](#query-quality-rules)
14
+
15
+ ## Asset Queries
16
+
17
+ | User intent | Query |
18
+ | --- | --- |
19
+ | Find all materials | `t:material` |
20
+ | Find all textures | `t:texture` |
21
+ | Find materials and textures | `t:[material, texture]` |
22
+ | Find prefabs | `t:prefab` |
23
+ | Find scenes | `t:scene` |
24
+ | Find scripts | `t:script` |
25
+ | Find shaders | `t:shader` |
26
+ | Find sprites | `t:sprite` |
27
+ | Find audio clips | `t:audioclip` |
28
+ | Find animation clips | `t:animationclip` |
29
+ | Find meshes/models | `t:mesh` |
30
+ | Find fonts | `t:font` |
31
+ | Find render textures | `t:rendertexture` |
32
+ | Find ScriptableObject assets | `t:ScriptableObject` |
33
+ | Find assets in a folder | `dir:Assets/FolderName` |
34
+ | Find prefabs in a folder | `t:prefab dir:Assets/FolderName` |
35
+ | Find materials in a folder | `t:material dir:Assets/FolderName` |
36
+ | Find assets by label | `l:LabelName` |
37
+ | Find assets by name or keyword | `keyword` |
38
+
39
+ If the user gives an asset extension or filename pattern, include it as a keyword or glob-style term when useful, such as `*.prefab`, `*.mat`, or `Player`.
40
+
41
+ ## Reference Queries
42
+
43
+ Use `ref=` when the request is about usage, references, dependencies, or "what uses this".
44
+
45
+ | User intent | Query |
46
+ | --- | --- |
47
+ | Find prefabs that reference textures | `t:prefab ref={t:texture}` |
48
+ | Find scenes that reference prefabs | `t:scene ref={t:prefab}` |
49
+ | Find assets that reference a named asset | `ref=AssetName` |
50
+ | Find scenes referencing a specific prefab path | `t:scene ref="Assets/Path/Prefab.prefab"` |
51
+ | Find prefabs that use a material | `t:prefab ref=MaterialName` |
52
+ | Find materials that use a texture | `t:material ref=TextureName` |
53
+ | Find scenes that use a script or component name | `t:scene ScriptOrComponentName` |
54
+ | Find prefabs that mention a script or component name | `t:prefab ScriptOrComponentName` |
55
+
56
+ If the user gives a specific selected asset but the exact path is unknown, use the visible asset name first and say that a path-specific query will be more precise.
57
+
58
+ ## Scene Queries
59
+
60
+ Scene-object searches should use component type names or object-name keywords. These queries are intended for the scene provider.
61
+
62
+ | User intent | Query |
63
+ | --- | --- |
64
+ | Find Lights | `t:Light` |
65
+ | Find Cameras | `t:Camera` |
66
+ | Find Rigidbodies | `t:Rigidbody` |
67
+ | Find Colliders | `t:Collider` |
68
+ | Find Canvas UI objects | `t:Canvas` |
69
+ | Find UI Buttons | `t:Button` |
70
+ | Find TextMeshPro UI text | `t:TextMeshProUGUI` |
71
+ | Find RectTransforms | `t:RectTransform` |
72
+ | Find Particle Systems | `t:ParticleSystem` |
73
+ | Find AudioSources | `t:AudioSource` |
74
+ | Find Animators | `t:Animator` |
75
+ | Find MeshRenderers | `t:MeshRenderer` |
76
+ | Find SkinnedMeshRenderers | `t:SkinnedMeshRenderer` |
77
+ | Find NavMeshAgents | `t:NavMeshAgent` |
78
+ | Find Terrain objects | `t:Terrain` |
79
+ | Find objects by name | `ObjectName` |
80
+
81
+ For scene object requests that mention both a name and a component, combine them, for example `Enemy t:Rigidbody`.
82
+
83
+ ## Natural-Language Mapping
84
+
85
+ Map common phrases to stable query forms:
86
+
87
+ | User wording | Query strategy |
88
+ | --- | --- |
89
+ | "where is X" | Use `X` as a keyword query unless X is clearly a type. |
90
+ | "which prefabs use X" | Use `t:prefab ref=X` when X is an asset name; otherwise use `t:prefab X`. |
91
+ | "what references this texture" | Use `ref=TextureName`, or `ref="Assets/Path/Texture.png"` if a path is available. |
92
+ | "what references the selected material" | Use the selected asset name/path if provided; otherwise ask for the material name or path. |
93
+ | "show all X in Assets/UI" | Use `t:x dir:Assets/UI` when X maps to an asset type. |
94
+ | "find scene objects with X" | Use `t:X` when X is a component type; otherwise use `X`. |
95
+ | "find current scene objects named X" | Use `X` with scene providers; add a component type only when the user specifies one. |
96
+ | "query only" | Return the query and do not open Search. |
97
+
98
+ ## Mixed Asset And Scene Queries
99
+
100
+ If the user asks broadly, such as "find everything related to Rigidbody", open Search with active asset and scene providers and use the plain keyword plus likely type:
101
+
102
+ - `Rigidbody`
103
+ - `t:Rigidbody`
104
+ - `Player Rigidbody`
105
+
106
+ For "materials using Standard shader" or other property-specific material questions, Unity Search may not expose every material shader property consistently across versions. Prefer a query such as `t:material Standard` and state that it narrows to likely matches; a scripted audit is a separate task.
107
+
108
+ ## Unsupported Or Risky Requests
109
+
110
+ Do not pretend Unity Search can reliably express every inspection.
111
+
112
+ - Missing script detection might need a scripted scan. Use a broad query such as `missing script` or `t:prefab missing` only as a starting point and state the limitation.
113
+ - Deep dependency graph questions are not this skill's scope. Provide a Search reference query if possible, then suggest dependency analysis as a separate workflow.
114
+ - Repository text search, build log analysis, web documentation lookup, package installation, menu command search, settings search, and result actions are outside v1 scope.
115
+ - If the user asks to "find and fix" assets, open Search for the find step only. Ask for confirmation before any separate modifying workflow.
116
+ - If the user asks about a selected/current asset but no selection details are visible, ask for the asset name or path rather than guessing.
117
+
118
+ ## Query Quality Rules
119
+
120
+ - Prefer lowercase asset type names such as `t:material`, `t:texture`, and `t:prefab`.
121
+ - Use Unity type names for scene components, such as `t:Light` and `t:Camera`.
122
+ - Quote paths with spaces, for example `ref="Assets/My Folder/Player.prefab"`.
123
+ - Do not combine many speculative terms. One good query is better than a long fragile query.
124
+ - If multiple plausible queries exist, choose one and mention alternatives only when helpful.
@@ -0,0 +1,82 @@
1
+ ---
2
+ name: implement-in-app-purchases
3
+ description: Implements, configures, and debugs Unity In-App Purchases, including subscriptions, receipt validation, and direct-to-customer payments via Stripe or Coda. Use when asked about real-money purchases or microtransactions, or migrating from native store billing, RevenueCat, Adapty, Essential Kit, or UniPay.
4
+ ---
5
+
6
+ # Unity In-App Purchasing
7
+
8
+ Namespace: `UnityEngine.Purchasing` | Security: `UnityEngine.Purchasing.Security`
9
+ Package: `com.unity.purchasing`
10
+
11
+ **Unity IAP has its own initialization path** via `UnityIAPServices.StoreController()` → `store.Connect()`. It does not require `UnityServices.InitializeAsync()`, but they can coexist if your project uses other UGS services. If Analytics is present and `InitializeAsync()` is called, IAP will automatically send transaction events.
12
+
13
+ ## Important
14
+
15
+ - Use the unity cli (`unity command --format json`) and the `unity-cli` and `unity-pipeline` skills for each step.
16
+ - Before making changes, establish a baseline of the current behavior so you can tell whether a later result is actually caused by your change.
17
+ - Create a restore point you can roll back to if your changes fail.
18
+ - Do only what's asked. Don't change unrelated assets or files.
19
+ - Never leave verification code in the user's script. Never build logging or detection they didn't ask for. See [Final step](#final-step).
20
+ - Avoid long explanations.
21
+
22
+ ## Before You Start
23
+
24
+ **Always read [references/pre-check.md](references/pre-check.md) first.** It scans the project for third-party IAP packages, native Google Billing, and existing Unity IAP versions, then routes to the correct path. Do not read any other reference file or make any changes until routing is resolved.
25
+
26
+ ## Full topic map
27
+
28
+ Documentation pages and API entry points: [references/topic-map.md](references/topic-map.md).
29
+ ## Detailed References
30
+
31
+ - **Project scan and path routing (read first):** See [references/pre-check.md](references/pre-check.md)
32
+ - **Common v5 API mistakes and where to read each API topic:** See [references/api-notes.md](references/api-notes.md)
33
+ - **Platform extension gotchas (Apple, Google):** See [references/platform-notes.md](references/platform-notes.md)
34
+ - **Editing `IAPProductCatalog.json` (schema, decimal serialization, refresh):** See [references/codeless-catalog.md](references/codeless-catalog.md)
35
+ - **v4 → v5 migration:** See [references/migration-v4-to-v5.md](references/migration-v4-to-v5.md)
36
+ - **Convert native Google BillingClient to Unity IAP 5:** See [references/path-convert-native-google-billing.md](references/path-convert-native-google-billing.md)
37
+ - **Convert native iOS StoreKit plugin to Unity IAP 5:** See [references/path-convert-native-storekit.md](references/path-convert-native-storekit.md)
38
+ - **Convert Essential Kit billing to Unity IAP 5:** See [references/convert-essentialkit.md](references/convert-essentialkit.md)
39
+ - **UniPay (FLOBUK) — assessment and guidance:** See [references/convert-unipay.md](references/convert-unipay.md)
40
+ - **RevenueCat — conversion assessment and guidance:** See [references/convert-revenuecat.md](references/convert-revenuecat.md)
41
+ - **Adapty — conversion assessment and guidance:** See [references/convert-adapty.md](references/convert-adapty.md)
42
+ - **Add Unity IAP 5 to a project with no existing IAP:** See [references/path-add-iap-to-new-project.md](references/path-add-iap-to-new-project.md)
43
+ - **Implement IAP D2C Capabilities (third-party payment provider — Stripe/Coda, requires v5.4+):** See [references/path-implement-iap-d2c.md](references/path-implement-iap-d2c.md)
44
+
45
+ Read reference files on demand — only when you need the API gotchas, platform extension details, or migration mappings.
46
+
47
+ ## Core rules
48
+
49
+ Read the linked page for the flow and sample code before writing each part, and reread it if the code fails. The rules below are the mistakes agents make that the pages don't stop them making.
50
+
51
+ ## API details
52
+
53
+ Initialization, purchases, restore, receipt validation, ownership/subscriptions, and compile errors: [references/api-details.md](references/api-details.md).
54
+ ## Final step
55
+
56
+ Do the following checks:
57
+
58
+ 1. Check the project has zero console errors. Use `console_status` for counts.
59
+ 2. Stop there unless the user asked you to prove it works or you suspect a specific fault.
60
+ 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. Take no screenshots, because they take too much time.
61
+
62
+ If a check fails, go back and reread the [docs pages](#full-topic-map) to find out what you missed.
63
+
64
+ After writing code that uses this package, also read the code back and check it, because IAP code can compile cleanly and still lose or double-grant purchases:
65
+
66
+ 1. Confirm all API calls match the v5 signatures on the [API reference](references/topic-map.md#api-reference) pages for the installed version — do NOT use v4 legacy patterns (`IStoreListener`, `UnityPurchasing.Initialize`, `ConfigurationBuilder`).
67
+ 2. Check the "Anti-Hallucination: Common v5 Mistakes" table in [api-notes.md](references/api-notes.md) — do NOT use `OnStoreConnectionFailed` (use `OnStoreDisconnected`), do NOT pass callbacks to `FetchProducts`/`FetchPurchases` (use events), do NOT use `product.receipt` (use `order.Info.Receipt`).
68
+ 3. Check that all required events are subscribed **before** calling `Connect()` (see [Initialization](references/api-details.md#initialization)).
69
+ 4. Verify the two-step purchase flow: `OnPurchasePending` → grant content → `ConfirmPurchase(pendingOrder)`.
70
+ 5. Confirm both success and failure events are subscribed for every async operation (`OnProductsFetched`/`OnProductsFetchFailed`, `OnStoreConnected`/`OnStoreDisconnected`, etc.).
71
+ 6. If handling subscriptions, verify `IsSubscribed()` is compared with `== Result.True`, not cast to `bool`.
72
+ 7. If updated files coexist with legacy versions in the same project, use a unique namespace (e.g., add `.Updated` suffix) to avoid CS0101/CS0111 compilation errors.
73
+ 8. If the project subscribes to `OnAuthAccountChanged` (v5.4+): verify the handler re-fetches products and purchases from scratch — Unity IAP clears both caches before raising this event. Do not read `GetProducts()` or `GetPurchases()` inside the handler.
74
+
75
+ ## Final report
76
+
77
+ Report the following to the user, in this order:
78
+
79
+ 1. What changed: each file you changed, with the old and new API calls or values where they apply (for example, `IStoreListener.ProcessPurchase` → `OnPurchasePending`).
80
+ 2. How you verified it: the outcome of each Final step check, including the console error count and anything you read through `eval` in Play mode.
81
+ 3. Incidental side effects: anything you touched beyond the requested change, such as packages you installed or upgraded, project or Services settings you changed, generated files (for example tangle classes or `IAPProductCatalog.json`), and temporary files you created or removed.
82
+ 4. Follow-up the user must do, for example product setup in App Store Connect or the Google Play Console, and sandbox testing on a device. Include the manual steps that the path reference file lists.
@@ -0,0 +1,41 @@
1
+ # Initialization
2
+
3
+ Read [Initialize Unity IAP](https://docs.unity.com/en-us/iap/set-up-in-app-purchasing.md) and [Create your catalog programmatically](https://docs.unity.com/en-us/iap/code-catalog.md).
4
+
5
+ - Subscribe to every event **before** `await store.Connect()`, because pending purchases from a previous session can fire as soon as the store connects. Initialize in `Awake()` so IAP is ready before other `Start()` methods.
6
+ - Subscribe to the failure event of every call (`OnStoreDisconnected`, `OnProductsFetchFailed`, `OnPurchasesFetchFailed`, `OnPurchaseFailed`) and to `OnPurchaseDeferred`. Missing failure events cause runtime warnings, and a missing `OnPurchaseDeferred` silently drops Ask-to-Buy and Google deferred purchases.
7
+ - `GetProducts()` and `GetPurchases()` return caches. Call `FetchProducts()` / `FetchPurchases()` first; `FetchPurchases()` overwrites the whole cached list.
8
+
9
+ # Purchases
10
+
11
+ Read [Purchases](https://docs.unity.com/en-us/iap/purchases.md).
12
+
13
+ - `store.PurchaseProduct(product)` leads to `OnPurchasePending` with a `PendingOrder`. Grant the content, save it, then call `store.ConfirmPurchase(pendingOrder)`, because unconfirmed purchases are re-delivered on the next launch.
14
+ - `OnPurchasePending` can fire more than once for the same purchase (for example, after a restart before confirmation). Check whether the content was already granted before granting it.
15
+ - Confirmed consumables are NOT returned by `FetchPurchases()`. Track consumable grants yourself, for example in Cloud Save or Economy.
16
+ - On `OnPurchaseDeferred`, show a pending state and don't grant. The purchase arrives later through `OnPurchasePending` if approved.
17
+
18
+ # Restore
19
+
20
+ Read [Restore purchases](https://docs.unity.com/en-us/iap/restore-purchases.md).
21
+
22
+ - `store.RestoreTransactions(callback)` re-delivers non-consumables and renewable subscriptions, each through `OnPurchasePending`. Add a "Restore Purchases" button on iOS, because Apple's review guidelines require one.
23
+ - Apple non-renewable subscriptions can't be restored through `RestoreTransactions`, so track them server-side.
24
+
25
+ # Receipt validation
26
+
27
+ Read [Receipt validation](https://docs.unity.com/en-us/iap/receipt-validation.md).
28
+
29
+ - Google Play: validate locally with `CrossPlatformValidator(GooglePlayTangle.Data(), Application.identifier)`. Generate the tangle with **Services > In-App Purchasing > Receipt Validation Obfuscator**.
30
+ - Apple StoreKit 2: local validation is a no-op. Send `order.Info.Apple?.jwsRepresentation` to a server for validation.
31
+
32
+ # Ownership and subscriptions
33
+
34
+ Read the [EntitlementStatus API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.EntitlementStatus.html) and the [SubscriptionInfo class reference](https://docs.unity.com/en-us/iap/subscriptioninfo-class-reference.md).
35
+
36
+ - To check whether the player owns a product, call `store.CheckEntitlement(product)`, handle `store.OnCheckEntitlement`, and compare with `EntitlementStatus.FullyEntitled`. This replaces v4's `product.hasReceipt`.
37
+ - Subscription info is on `order.Info.PurchasedProductInfo`, NOT on `CartItem`. `IsSubscribed()` returns `Result`, not `bool`, so compare with `== Result.True`.
38
+
39
+ # Compile errors
40
+
41
+ - `ProductFetchFailed` has `.FailureReason` and `.FailedFetchProducts`, not `.Message`, and `StoreConnectionFailureDescription` has `.Message`, not `.reason`. A wrong name causes CS1061. The full table and the other common v5 mistakes are in [api-notes.md](../references/api-notes.md).
@@ -0,0 +1,105 @@
1
+ # Unity IAP API Notes
2
+
3
+ This file lists only the API mistakes agents commonly make with Unity IAP v5. It is not an API reference. For signatures, members and code samples, look the type up in the package's `xrefmap.yml` (see the skill's API reference section) and read its page, and read the matching manual page from the skill's Full topic map. Read the page before writing the code and again if it fails to compile, because your training data may describe v4 or an older v5 minor version.
4
+
5
+ ## Table of Contents
6
+
7
+ - [Anti-Hallucination: v5 vs Legacy API](#anti-hallucination-v5-vs-legacy-api)
8
+ - [Anti-Hallucination: Common v5 Mistakes](#anti-hallucination-common-v5-mistakes)
9
+ - [Where to read each topic](#where-to-read-each-topic)
10
+ - [OnAuthAccountChanged clears the caches (v5.4+)](#onauthaccountchanged-clears-the-caches-v54)
11
+ - [Purchase flow gotchas](#purchase-flow-gotchas)
12
+ - [Subscription info access path](#subscription-info-access-path)
13
+ - [Platform extension gotchas](#platform-extension-gotchas)
14
+ - [Failure description property names](#failure-description-property-names)
15
+ - [Receipt validation gotchas](#receipt-validation-gotchas)
16
+
17
+ ## Anti-Hallucination: v5 vs Legacy API
18
+
19
+ The v4 API is `[Obsolete]` in v5. Don't use legacy patterns, because they compile with warnings but bypass the v5 two-step flow. For the full mapping, read [Upgrade from IAP v4 to v5](https://docs.unity.com/en-us/iap/upgrade-to-iap-v5.md).
20
+
21
+ | WRONG (Legacy v4) | CORRECT (v5) |
22
+ |---|---|
23
+ | `UnityPurchasing.Initialize(listener, builder)` | `UnityIAPServices.StoreController()` then `store.Connect()` |
24
+ | `IStoreListener.OnInitialized(controller, extensions)` | `store.OnStoreConnected` event |
25
+ | `IStoreListener.ProcessPurchase(args)` | `store.OnPurchasePending` event |
26
+ | `controller.InitiatePurchase(product)` | `store.PurchaseProduct(product)` |
27
+ | `controller.ConfirmPendingPurchase(product)` | `store.ConfirmPurchase(pendingOrder)` |
28
+ | `extensions.GetExtension<IAppleExtensions>()` | `store.AppleStoreExtendedService` / `store.AppleStoreExtendedPurchaseService` |
29
+ | `extensions.GetExtension<IGooglePlayStoreExtensions>()` | `store.GooglePlayStoreExtendedService` / `store.GooglePlayStoreExtendedPurchaseService` |
30
+ | `ConfigurationBuilder.Instance(...)` | Not needed; pass a `ProductDefinition` list to `FetchProducts` |
31
+
32
+ ## Anti-Hallucination: Common v5 Mistakes
33
+
34
+ These are NOT real APIs. Don't use them:
35
+
36
+ | WRONG (does not exist) | CORRECT |
37
+ |---|---|
38
+ | `store.OnStoreConnectionFailed` | `store.OnStoreDisconnected`, which receives `StoreConnectionFailureDescription` |
39
+ | `store.FetchProducts(defs, successCb, failCb)` | `store.FetchProducts(List<ProductDefinition>)`, then subscribe to `OnProductsFetched` / `OnProductsFetchFailed` separately |
40
+ | `store.FetchPurchases(successCb, failCb)` | `store.FetchPurchases()`, then subscribe to `OnPurchasesFetched` / `OnPurchasesFetchFailed` separately |
41
+ | `product.receipt` | `order.Info.Receipt`. The receipt is on the order, not the product |
42
+ | `product.hasReceipt` | `store.CheckEntitlement(product)` + `OnCheckEntitlement` |
43
+ | `new SubscriptionManager(product, introJson)` | `order.Info.PurchasedProductInfo`. See [Subscription info access path](#subscription-info-access-path) |
44
+ | `pendingOrder.OrderInfo.Apple.jwsRepresentation` | `pendingOrder.Info.Apple?.jwsRepresentation`. Note `Info`, not `OrderInfo`, and the null check |
45
+ | `cartItem.subscriptionInfo` | `CartItem` only has `Product` and `Quantity`. See [Subscription info access path](#subscription-info-access-path) |
46
+
47
+ ## Where to read each topic
48
+
49
+ Replace `<VERSION>` with the major.minor of `com.unity.purchasing` in `Packages/packages-lock.json`.
50
+
51
+ | Topic | Read |
52
+ |---|---|
53
+ | `StoreController` members, events and extension properties | [StoreController API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.StoreController.html) |
54
+ | Initialization order and a full sample | [Initialize Unity IAP](https://docs.unity.com/en-us/iap/set-up-in-app-purchasing.md) |
55
+ | `ProductDefinition`, `StoreSpecificIds`, `CatalogProvider` | [Create your catalog programmatically](https://docs.unity.com/en-us/iap/code-catalog.md) |
56
+ | Pending, confirmed, failed and deferred orders | [Purchases](https://docs.unity.com/en-us/iap/purchases.md) |
57
+ | `RestoreTransactions` | [Restore purchases](https://docs.unity.com/en-us/iap/restore-purchases.md) |
58
+ | `CrossPlatformValidator`, receipt structure | [Receipt validation](https://docs.unity.com/en-us/iap/receipt-validation.md) |
59
+ | `SubscriptionInfo` methods and per-store behavior | [SubscriptionInfo class reference](https://docs.unity.com/en-us/iap/subscriptioninfo-class-reference.md) |
60
+ | `EntitlementStatus` values | [EntitlementStatus API](https://docs.unity3d.com/Packages/com.unity.purchasing@<VERSION>/api/UnityEngine.Purchasing.EntitlementStatus.html) |
61
+ | `IAppleOrderInfo`, `AppleStoreExtendedProductService`, `CatalogListing`, `uSku`, and other types | Look the type up in `xrefmap.yml` |
62
+
63
+ ## OnAuthAccountChanged clears the caches (v5.4+)
64
+
65
+ Unity IAP clears the cached product list and purchase list **before** it raises `OnAuthAccountChanged`, so any `Product` or `Order` you held is stale and `GetProducts()` / `GetPurchases()` return empty inside the handler. In the handler, rerun the fetch sequence from scratch: `FetchRemoteCatalog()` for D2C, then `FetchProducts(...)` and `FetchPurchases()`.
66
+
67
+ ## Purchase flow gotchas
68
+
69
+ - `OnPurchaseConfirmed` receives the `Order` base type. Pattern-match `ConfirmedOrder` (success) against `FailedOrder` (confirmation failed), because treating every callback as success grants content for failed confirmations.
70
+ - Don't recommend `ProcessPendingOrdersOnPurchasesFetched(false)` to migrating users. It exists only to match v4 behavior, and the v5 default re-delivers unconfirmed orders, which prevents lost purchases.
71
+ - When a product has `CatalogListings` (v5.4+), purchase by the `CatalogListing` directly to avoid a second lookup. `product.definition.id` still works for existing code.
72
+
73
+ ## Subscription info access path
74
+
75
+ Subscription info is on `IPurchasedProductInfo`, reached through `order.Info.PurchasedProductInfo`, filtered by `productId`. It is NOT on `CartItem`.
76
+
77
+ `IsSubscribed()` and the other state queries return the `Result` enum (`True` / `False` / `Unsupported`), not `bool`. Compare with `== Result.True`, because that is also null-safe when `subscriptionInfo` is missing.
78
+
79
+ `AppleProductMetadata` does NOT expose `introductoryPrice`, `introductoryPriceLocale`, `introductoryNumberOfPeriods` or `subscriptionPeriod`. Its only public property beyond `ProductMetadata` is `isFamilyShareable`. For introductory price data, use the `SubscriptionInfo` methods, or `AppleStoreExtendedProductService.GetIntroductoryPriceDictionary()` for raw JSON.
80
+
81
+ ## Platform extension gotchas
82
+
83
+ - The extension properties on `StoreController` (`AppleStoreExtendedService`, `AppleStoreExtendedPurchaseService`, `GooglePlayStoreExtendedService`, `GooglePlayStoreExtendedPurchaseService`, `AppleStoreExtendedProductService`) are `null` on other platforms and in the Editor. Null-check with `if`, because `?.` doesn't work with `+=`.
84
+ - `OnEntitlementRevoked`, `OnPromotionalPurchaseIntercepted` and `OnDeferredPaymentUntilRenewalDate` are on the extended purchase services, NOT on `StoreController`.
85
+ - `OnEntitlementRevoked` receives the product ID as a `string`, not a `Product` or a list.
86
+ - On `AppleStoreExtendedProductService` (v5.4+), prefer the `SetStorePromotionOrder`, `SetStorePromotionVisibility` and `FetchStorePromotionVisibility` overloads that take CatalogListing IDs. The `Product` overloads are convenience wrappers.
87
+
88
+ For more platform gotchas, see the platform notes reference file.
89
+
90
+ ## Failure description property names
91
+
92
+ Each type has public lowercase fields and PascalCase read-only properties. Both compile, so prefer the properties. A wrong name causes CS1061:
93
+
94
+ | Type | Field (lowercase) | Property (PascalCase) | NOT |
95
+ |---|---|---|---|
96
+ | `StoreConnectionFailureDescription` | `.message` | `.Message` | ~~`.reason`~~ |
97
+ | `ProductFetchFailed` | — | `.FailureReason`, `.FailedFetchProducts` | ~~`.Message`~~ |
98
+ | `FailedOrder` | — | `.FailureReason`, `.Details` | — |
99
+ | `PurchasesFetchFailureDescription` | `.message`, `.failureReason` | `.Message`, `.FailureReason` | — |
100
+
101
+ ## Receipt validation gotchas
102
+
103
+ - Use the Google-only `CrossPlatformValidator(GooglePlayTangle.Data(), Application.identifier)` constructor. Apple local validation and `AppleTangle.Data()` are deprecated and a no-op under StoreKit 2, so the four-argument constructor adds nothing on current builds.
104
+ - `Validate` throws `IAPSecurityException` on an invalid receipt. Don't grant content in that case.
105
+ - For Apple, send `order.Info.Apple?.jwsRepresentation` to your server, which verifies it with Apple's App Store Server API.