@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,150 @@
1
+ ## Code Templates
2
+
3
+ Each template is a snippet to run through the Editor's `script eval` command. Hard stops `throw`,
4
+ so the eval fails loudly; anything the caller needs to read is `return`ed.
5
+
6
+ **`script eval` compiles a statement block, not a file.** `using` directives are rejected there — the
7
+ compiler reads `using UnityEngine;` as a resource-disposal statement and fails. So these
8
+ templates fully qualify every type. If you instead save the code as a `.cs` file for the user
9
+ to keep, add the usings back and drop the qualification.
10
+
11
+ ### Creating a Global Volume with Effects
12
+
13
+ ```csharp
14
+ // Verify HDR is enabled on the URP Asset
15
+ var urpAsset = UnityEngine.Rendering.Universal.UniversalRenderPipeline.asset;
16
+ if (urpAsset == null) { throw new System.Exception("No UniversalRenderPipelineAsset active."); }
17
+ if (!urpAsset.supportsHDR) { throw new System.Exception("HDR is disabled on the URP Asset. Enable it for Bloom/Tonemapping."); }
18
+
19
+ var profile = UnityEngine.ScriptableObject.CreateInstance<UnityEngine.Rendering.VolumeProfile>();
20
+ var assetPath = UnityEditor.AssetDatabase.GenerateUniqueAssetPath("Assets/Settings/PostProcessProfile.asset");
21
+ UnityEditor.AssetDatabase.CreateAsset(profile, assetPath);
22
+
23
+ // MUST set overrideState = true on each property
24
+ var bloom = profile.Add<UnityEngine.Rendering.Universal.Bloom>();
25
+ bloom.threshold.overrideState = true;
26
+ bloom.threshold.value = 0.9f;
27
+ bloom.intensity.overrideState = true;
28
+ bloom.intensity.value = 1f;
29
+ bloom.scatter.overrideState = true;
30
+ bloom.scatter.value = 0.7f;
31
+
32
+ var tonemapping = profile.Add<UnityEngine.Rendering.Universal.Tonemapping>();
33
+ tonemapping.mode.overrideState = true;
34
+ tonemapping.mode.value = UnityEngine.Rendering.Universal.TonemappingMode.ACES;
35
+
36
+ var volumeObj = new UnityEngine.GameObject("Global Volume");
37
+ var volume = volumeObj.AddComponent<UnityEngine.Rendering.Volume>();
38
+ volume.isGlobal = true;
39
+ volume.profile = profile;
40
+
41
+ UnityEditor.Undo.RegisterCreatedObjectUndo(volumeObj, "Create Global Volume");
42
+ UnityEditor.EditorUtility.SetDirty(profile);
43
+ UnityEditor.AssetDatabase.SaveAssets();
44
+
45
+ return "Created Global Volume with Bloom and ACES Tonemapping.";
46
+ ```
47
+
48
+ ### Enabling Post-Processing on Camera
49
+
50
+ ```csharp
51
+ var cam = UnityEngine.Camera.main;
52
+ if (cam == null) { throw new System.Exception("No Main Camera found."); }
53
+
54
+ if (!cam.TryGetComponent<UnityEngine.Rendering.Universal.UniversalAdditionalCameraData>(out var data)) { throw new System.Exception("Missing UniversalAdditionalCameraData. Is URP active?"); }
55
+
56
+ UnityEditor.Undo.RecordObject(data, "Enable Post-Processing");
57
+ data.renderPostProcessing = true;
58
+ UnityEditor.EditorUtility.SetDirty(data);
59
+
60
+ // This edits a component, which lives in the scene rather than in an asset, so
61
+ // AssetDatabase.SaveAssets() does not persist it. SetDirty only marks; nothing is written until
62
+ // the scene is saved. Mark the scene and say it is unsaved, rather than reporting the change as
63
+ // done: if the session ends without a scene save, the edit is gone.
64
+ var scene = data.gameObject.scene;
65
+ UnityEditor.SceneManagement.EditorSceneManager.MarkSceneDirty(scene);
66
+ return $"Post-processing enabled on '{cam.name}'. Scene '{scene.name}' is modified but NOT saved. "
67
+ + "Save it, or the change is lost when the Editor session ends.";
68
+ ```
69
+
70
+ The right choice depends on whether anyone is watching:
71
+
72
+ - **Interactive run** (the user is at the Editor): report and let them save. A save from here also
73
+ commits whatever else they had in progress in that scene, which is not yours to decide.
74
+ - **Non-interactive run** (batch, CI, or a session that is about to end): call
75
+ `UnityEditor.SceneManagement.EditorSceneManager.SaveScene(scene)` and say that you saved it.
76
+ Nobody is there to act on a "scene is unsaved" report, so leaving it unsaved just loses the work.
77
+
78
+ ### Modifying an Existing Volume Profile
79
+
80
+ **Use `sharedProfile`, not `profile`.** `profile` auto-clones the asset into a runtime instance, so
81
+ `SetDirty` on it marks a clone that is not an asset at all and the edit can never reach disk. Merely
82
+ reading `volume.profile` is enough to trigger the clone, so the null check has to use `sharedProfile`
83
+ too. `sharedProfile` returns the asset itself, which is what an Editor-time edit needs.
84
+
85
+ ```csharp
86
+ var volumeObj = UnityEngine.GameObject.Find("Global Volume");
87
+ if (volumeObj != null && volumeObj.TryGetComponent<UnityEngine.Rendering.Volume>(out var volume)
88
+ && volume.sharedProfile != null)
89
+ {
90
+ var profile = volume.sharedProfile;
91
+ if (profile.TryGet<UnityEngine.Rendering.Universal.Bloom>(out var bloom))
92
+ {
93
+ bloom.intensity.overrideState = true;
94
+ bloom.intensity.value = 2f;
95
+ }
96
+ UnityEditor.EditorUtility.SetDirty(profile);
97
+ // SetDirty only marks the asset. Without this the edit is in memory only: it reads back
98
+ // correctly for the rest of the session and is lost when the session ends.
99
+ UnityEditor.AssetDatabase.SaveAssets();
100
+ }
101
+ ```
102
+
103
+ ### Making a change undoable through `script eval`
104
+
105
+ `Undo.RecordObject` alone does **not** produce an undo entry when the snippet runs through the
106
+ Editor's `script eval` command (measured: nothing appeared on the undo stack). `RecordObject` takes a
107
+ *deferred* snapshot that Unity flushes at the end of an Editor event, and a snippet executed by
108
+ the Pipeline server is outside that loop.
109
+
110
+ Use the explicit group + immediate-snapshot + flush sequence instead, which does not rely on
111
+ the event loop:
112
+
113
+ ```csharp
114
+ UnityEditor.Undo.IncrementCurrentGroup();
115
+ UnityEditor.Undo.SetCurrentGroupName("Set up post-processing"); // the label the user will see
116
+ var group = UnityEditor.Undo.GetCurrentGroup();
117
+
118
+ UnityEditor.Undo.RegisterCompleteObjectUndo(target, "Set up post-processing"); // immediate, not deferred
119
+ // ... make the modification, and for a newly created object:
120
+ // UnityEditor.Undo.RegisterCreatedObjectUndo(newObject, "Set up post-processing");
121
+ UnityEditor.EditorUtility.SetDirty(target);
122
+
123
+ // SetDirty marks; it does not write. Persist according to what `target` is, or the change is
124
+ // lost at session end even though every read-back looks correct:
125
+ // an asset (Volume Profile, URP Asset) -> UnityEditor.AssetDatabase.SaveAssets();
126
+ // a component in a scene -> MarkSceneDirty(target.gameObject.scene) and tell
127
+ // the user the scene needs saving
128
+ UnityEditor.Undo.FlushUndoRecordObjects(); // force the snapshot out now
129
+ UnityEditor.Undo.CollapseUndoOperations(group); // one entry, not several
130
+
131
+ return UnityEditor.Undo.GetCurrentGroupName(); // report the label back to confirm it landed
132
+ ```
133
+
134
+ **Verify it landed rather than assuming.** The returned group name tells you the group exists;
135
+ to confirm the entry is actually on the stack, have the user check `Edit > Undo <label>` in the
136
+ menu — it should read your label.
137
+
138
+ **If it still doesn't land, fall back to a scoped revert rather than dropping the guarantee.**
139
+ Before modifying, read the current value of the field you're about to change and report it with
140
+ a one-line snippet that restores it, so reverting is a single command:
141
+
142
+ ```csharp
143
+ // captured before the change
144
+ var previous = data.renderPostProcessing; // report: previous = false
145
+ // revert snippet to hand the user:
146
+ // data.renderPostProcessing = false;
147
+ ```
148
+
149
+ Scene and prefab files are text-serialized, so version control is the last resort, not the
150
+ first answer — offer the scoped revert before pointing at `git`.
@@ -0,0 +1,86 @@
1
+ ## Effect Reference
2
+
3
+ **Bloom** (`Bloom`) — Glow on bright areas. Best with HDR rendering enabled on the URP Asset; works in SDR if `threshold` < 1.
4
+ - `threshold` (MinFloatParameter, default 0.9, min 0) — brightness cutoff below which pixels don't bloom.
5
+ - `intensity` (MinFloatParameter, default 0, min 0) — strength of the bloom effect.
6
+ - `scatter` (ClampedFloatParameter, default 0.7, 0–1) — spread/diffusion of the glow.
7
+ - `clamp` (MinFloatParameter, default 65472, min 0) — clamps pixel intensity to prevent artifacts.
8
+ - `tint` (ColorParameter, default white) — color tint applied to bloom.
9
+ - `highQualityFiltering` (BoolParameter, default false) — uses bicubic upsampling for smoother bloom.
10
+ - `downscale` (BloomDownscaleMode: `Half`, `Quarter`) — resolution for bloom computation.
11
+ - `maxIterations` (ClampedIntParameter, default 6, 2–8) — number of blur passes.
12
+
13
+ **Tonemapping** (`Tonemapping`) — Maps HDR to display range. Requires HDR.
14
+ - `mode` (TonemappingMode: `None`, `Neutral`, `ACES`) — `ACES` for cinematic, `Neutral` for minimal color shift.
15
+
16
+ **Color Adjustments** (`ColorAdjustments`) — **WARNING: Class is `ColorAdjustments`, NOT `ColorGrading`.**
17
+ - `postExposure` (FloatParameter, default 0) — exposure adjustment in EV units. Unbounded.
18
+ - `contrast` (ClampedFloatParameter, default 0, -100–100).
19
+ - `colorFilter` (ColorParameter, default white) — multiplied against the final color.
20
+ - `hueShift` (ClampedFloatParameter, default 0, -180–180) — shifts all hues.
21
+ - `saturation` (ClampedFloatParameter, default 0, -100–100).
22
+
23
+ **Depth of Field** (`DepthOfField`)
24
+ - `mode` (DepthOfFieldMode: `Off`, `Gaussian`, `Bokeh`).
25
+ - Gaussian mode: `gaussianStart` (MinFloatParameter, default 10, min 0), `gaussianEnd` (MinFloatParameter, default 30, min 0), `gaussianMaxRadius` (ClampedFloatParameter, default 1, 0.5–1.5).
26
+ - Bokeh mode: `focusDistance` (MinFloatParameter, default 10, min 0.1), `focalLength` (ClampedFloatParameter, default 50, 1–300), `aperture` (ClampedFloatParameter, default 5.6, 1–32), `bladeCount` (ClampedIntParameter, default 5, 3–9), `bladeCurvature` (ClampedFloatParameter, default 1, 0–1), `bladeRotation` (ClampedFloatParameter, default 0, -180–180).
27
+
28
+ **Vignette** (`Vignette`)
29
+ - `intensity` (ClampedFloatParameter, default 0, 0–1).
30
+ - `smoothness` (ClampedFloatParameter, default 0.2, 0.01–1).
31
+ - `color` (ColorParameter, default black).
32
+ - `center` (Vector2Parameter, default (0.5, 0.5)).
33
+ - `rounded` (BoolParameter, default false) — constrains vignette to circular shape.
34
+
35
+ **Motion Blur** (`MotionBlur`)
36
+ - `mode` (MotionBlurMode: `CameraOnly`, `CameraAndObjects`). `CameraAndObjects` requires per-object motion vectors.
37
+ - `quality` (MotionBlurQuality: `Low`, `Medium`, `High`).
38
+ - `intensity` (ClampedFloatParameter, default 0, 0–1).
39
+ - `clamp` (ClampedFloatParameter, default 0.05, 0–0.2) — maximum velocity in screen fraction.
40
+
41
+ **Film Grain** (`FilmGrain`)
42
+ - `type` (FilmGrainLookup: `Thin1`, `Thin2`, `Medium1`–`Medium6`, `Large01`, `Large02`, `Custom`).
43
+ - `intensity` (ClampedFloatParameter, default 0, 0–1).
44
+ - `response` (ClampedFloatParameter, default 0.8, 0–1).
45
+ - `texture` (NoInterpTextureParameter, default null) — required when `type` is `Custom`.
46
+
47
+ **Chromatic Aberration** (`ChromaticAberration`)
48
+ - `intensity` (ClampedFloatParameter, default 0, 0–1). Keep subtle (0.05–0.15) for realism.
49
+
50
+ **Split Toning** (`SplitToning`)
51
+ - `shadows` (ColorParameter, default grey).
52
+ - `highlights` (ColorParameter, default grey).
53
+ - `balance` (ClampedFloatParameter, default 0, -100–100).
54
+
55
+ **Lens Distortion** (`LensDistortion`)
56
+ - `intensity` (ClampedFloatParameter, default 0, -1–1). Negative = barrel, positive = pincushion.
57
+ - `xMultiplier` (ClampedFloatParameter, default 1, 0–1).
58
+ - `yMultiplier` (ClampedFloatParameter, default 1, 0–1).
59
+ - `center` (Vector2Parameter, default (0.5, 0.5)).
60
+ - `scale` (ClampedFloatParameter, default 1, 0.01–5).
61
+
62
+ **White Balance** (`WhiteBalance`)
63
+ - `temperature` (ClampedFloatParameter, default 0, -100–100). Negative = cool, positive = warm.
64
+ - `tint` (ClampedFloatParameter, default 0, -100–100). Negative = green, positive = magenta.
65
+
66
+ **Panini Projection** (`PaniniProjection`) — Only useful with camera FOV > 90.
67
+ - `distance` (ClampedFloatParameter, default 0, 0–1).
68
+ - `cropToFit` (ClampedFloatParameter, default 1, 0–1).
69
+
70
+ **Lift Gamma Gain** (`LiftGammaGain`) — Each is `Vector4Parameter` (RGBA where A is intensity offset, defaults to (1,1,1,0)).
71
+ - `lift` — affects shadows.
72
+ - `gamma` — affects midtones.
73
+ - `gain` — affects highlights.
74
+
75
+ **Shadows Midtones Highlights** (`ShadowsMidtonesHighlights`) — Each `Vector4Parameter`, defaults to (1,1,1,0).
76
+ - `shadows`, `midtones`, `highlights`.
77
+ - Zone boundaries: `shadowsStart` (default 0), `shadowsEnd` (default 0.3), `highlightsStart` (default 0.55), `highlightsEnd` (default 1). All `MinFloatParameter`, min 0.
78
+
79
+ **Color Curves** (`ColorCurves`) — All `TextureCurveParameter`.
80
+ - `master`, `red`, `green`, `blue` — default linear (0,0)→(1,1).
81
+ - `hueVsHue`, `hueVsSat`, `satVsSat`, `lumVsSat` — default empty, neutral at 0.5.
82
+
83
+ **Channel Mixer** (`ChannelMixer`) — All `ClampedFloatParameter`, -200–200.
84
+ - `redOutRedIn` (default 100), `redOutGreenIn` (default 0), `redOutBlueIn` (default 0).
85
+ - `greenOutRedIn` (default 0), `greenOutGreenIn` (default 100), `greenOutBlueIn` (default 0).
86
+ - `blueOutRedIn` (default 0), `blueOutGreenIn` (default 0), `blueOutBlueIn` (default 100).
@@ -0,0 +1,92 @@
1
+ ---
2
+ name: validate-urp-render-graph-renderer-feature
3
+ description: Reviews a Unity 6 URP ScriptableRendererFeature that uses the Render Graph API, checking resource wiring, material binding, execution structure, and best practices. Use to validate a renderer feature.
4
+ ---
5
+ # Skill: Validate a Unity URP Render Graph Renderer Feature
6
+
7
+ ## Purpose
8
+ Review a Unity 6+ URP Render Graph `ScriptableRendererFeature` and its associated pass implementation for correctness issues related to material binding, resource wiring, render graph texture creation, static render function structure, global resource exposure, and API/version usage.
9
+
10
+ ## When to Use
11
+ Use this skill when:
12
+ - reviewing AI-generated Unity URP Render Graph renderer feature code
13
+ - validating a custom `ScriptableRendererFeature` before integrating it
14
+ - checking for common Render Graph resource wiring and pass setup mistakes
15
+ - diagnosing suspicious but plausible Render Graph pass implementations
16
+ - reviewing whether a custom raster/blit/copy pass uses the most appropriate Render Graph helper APIs
17
+
18
+ ## Inputs
19
+ The skill should expect:
20
+ - **Unity version**
21
+ - **URP version**
22
+ - **Render Graph renderer feature code to review**
23
+ - `ScriptableRendererFeature`
24
+ - associated pass code
25
+ - or both
26
+ - **Intended behavior**
27
+ - **Expected inputs/outputs**, if known
28
+ - **Optional constraints**
29
+ - project conventions
30
+ - required pass type
31
+ - known resources
32
+ - required material/shader properties
33
+
34
+ ## Output Format
35
+ The skill must return results in the following structure:
36
+
37
+ ### 1. Validation Summary
38
+ A short overall assessment of the implementation.
39
+
40
+ ### 2. Confirmed Issues
41
+ Concrete issues directly supported by the provided code.
42
+
43
+ ### 3. Likely Issues / Risky Assumptions
44
+ Potential issues that depend on missing context or incomplete information.
45
+
46
+ ### 4. Recommended Fixes
47
+ Minimal targeted fixes for each issue.
48
+
49
+ ### 5. Corrected Snippets
50
+ Small corrected code snippets where useful.
51
+
52
+ ### 6. Missing Information
53
+ Any information needed to validate the code with higher confidence.
54
+
55
+ ## Validation Checklist
56
+
57
+ ## Validation checklist
58
+
59
+ The eight checks — material binding, texture wiring, execution structure, descriptor validation, copy/blit simplification, global exposure, and input declaration: [references/validation-checklist.md](references/validation-checklist.md).
60
+ ## Guardrails
61
+ The skill must:
62
+ - avoid inventing unsupported APIs
63
+ - distinguish **confirmed** issues from **likely** issues
64
+ - prefer minimal targeted fixes over broad rewrites
65
+ - explain why each issue matters
66
+ - flag hidden coupling and unnecessary global state
67
+ - state when the provided code is insufficient for full certainty
68
+
69
+ ## Non-Goals
70
+ - guarantee runtime correctness
71
+ - rewrite the entire renderer feature unless necessary
72
+ - validate unrelated gameplay logic
73
+ - validate shader internals unless directly relevant to pass wiring or binding
74
+
75
+ ## Evaluation Criteria
76
+ A successful validation should:
77
+ - catch real wiring and API issues
78
+ - identify suspicious but plausible mistakes
79
+ - provide actionable fixes
80
+ - avoid false certainty
81
+ - improve trust in generated render pass code
82
+
83
+ ## Notes for Future Expansion
84
+ As new recurring issues are discovered, extend this checklist with additional rules such as:
85
+ - pass ordering / injection point validation
86
+ - resource lifetime and cleanup checks
87
+ - read/write hazard detection
88
+ - unnecessary copies or allocations
89
+ - camera depth/color dependency validation
90
+ - multi-pass dependency validation
91
+ - override material correctness
92
+ - pass configuration
@@ -0,0 +1,179 @@
1
+ # 1. Material Binding
2
+ Check that:
3
+ - materials are declared clearly
4
+ - serialized materials are exposed correctly when needed
5
+ - materials are passed into the pass correctly
6
+ - null handling exists where required
7
+ - declared materials are actually used
8
+ - **all required material inputs are bound before execution**
9
+ - **the primary input texture is explicitly bound when the shader expects one**
10
+ - auxiliary textures and parameter textures are also bound explicitly
11
+ - texture/property binding matches the shader’s expected property names
12
+
13
+ Flag as an issue when:
14
+ - a material is declared or passed but not actually used
15
+ - only secondary textures or parameters are bound while the main input texture is omitted
16
+ - the pass binds a mask/noise/auxiliary texture but fails to bind the primary color/input texture
17
+ - required shader properties are assumed to exist without being set
18
+ - property names are inconsistent or ambiguous
19
+ - the code relies on implicit main texture binding when explicit binding is required by the pass pattern
20
+
21
+ Prefer patterns where:
22
+ 1. the material is created or assigned clearly
23
+ 2. the primary source texture is bound explicitly
24
+ 3. all auxiliary textures are bound explicitly
25
+ 4. property names are consistent and intentional
26
+ 5. null or missing-resource cases are handled or reported
27
+
28
+ # 2. Texture Resource Wiring
29
+ Check that:
30
+ - sampled/read textures, write targets, and auxiliary textures are clearly distinguished
31
+ - textures used with `UseTexture(...)` are appropriate for read access
32
+ - textures used with `SetRenderAttachment(...)` are appropriate as write targets
33
+ - source, destination, and auxiliary resources are not confused
34
+ - all expected textures are explicitly wired
35
+ - texture property names are explicit and consistent when materials are involved
36
+ - the implementation does not invent texture availability
37
+ - multi-texture resource usage is handled explicitly rather than implicitly
38
+
39
+ Flag as an issue when:
40
+ - a texture intended as an input/read resource is instead used as a write target without justification
41
+ - a destination/write target is confused with a sampled input
42
+ - auxiliary textures are used without being clearly sourced or wired
43
+ - a required texture resource is missing from the pass setup
44
+ - read/write resource roles are ambiguous or inconsistent
45
+
46
+ # 3. Execution Structure / Static Render Function
47
+ Check that:
48
+ - the render function is declared as `static`
49
+ - the execution structure matches the target pass type and API style
50
+ - pass data is wired correctly into execution
51
+ - resources are accessed in the correct stage
52
+ - execution logic is consistent with the intended render pass behavior
53
+ - every `PassData` field used by the render function is explicitly assigned during pass setup for the current recording
54
+ - the implementation does not rely on default values or previously assigned `PassData` state
55
+ - resource handles stored in `PassData` are assigned fresh for the current frame/pass recording and are not left dangling from prior usage
56
+
57
+ Flag as an issue when:
58
+ - the render function is not `static`
59
+ - the implementation uses an instance method where the API pattern expects a static render function
60
+ - pass data or required resources are accessed through instance state instead of the pass data/context provided to the static function
61
+ - execution flow does not match the expected render graph or pass execution pattern
62
+ - a `PassData` field is read in the render function but is not clearly assigned during pass setup
63
+ - only some `PassData` fields are reassigned while others may retain stale values from previous pooled usage
64
+ - a resource handle stored in `PassData` may survive from a previous frame or pass due to incomplete reassignment
65
+ - the implementation risks using a dangling or stale handle because pass data is not fully initialized each time it is recorded
66
+
67
+ Prefer:
68
+ - explicitly assigning every `PassData` field used by the pass during each `RecordRenderGraph(...)` call
69
+ - treating `PassData` as transient per-recording data, not persistent state
70
+ - avoiding partial initialization of pooled pass data objects
71
+
72
+ # 4. Render Graph Descriptor Validation
73
+ Check that:
74
+ - the implementation does **not** create a new `TextureDesc` by default when an appropriate graph-derived descriptor can be used directly
75
+ - when a texture should match the active render target, the descriptor is sourced from the relevant render graph resource first, such as:
76
+ - `resourceData.activeColorTexture.GetDescriptor(renderGraph)`
77
+ - or another appropriate existing graph-backed resource
78
+ - only the fields that actually need to differ are modified after sourcing the descriptor
79
+ - descriptor fields such as name, depth bits, format, and MSAA are intentionally preserved or intentionally overridden
80
+ - any manual reconstruction of descriptor data is justified by a specific requirement
81
+
82
+ Flag as an issue when:
83
+ - the code creates a fresh `TextureDesc` without first attempting to reuse a graph-derived descriptor
84
+ - width and height are manually copied into a new descriptor structure by default
85
+ - `cameraTargetDescriptor` is used as the primary source when a render-graph-derived descriptor is available and more accurate
86
+ - important properties such as MSAA, graphics format, or compatibility with the active render target are dropped accidentally
87
+ - descriptor reconstruction is used as a convenience shortcut rather than a necessary divergence from the source resource
88
+
89
+ Preferred rule:
90
+ - **Do not create a new `TextureDesc` unless a graph-derived descriptor cannot be used directly or the texture must intentionally diverge from the source resource.**
91
+
92
+ Preferred pattern:
93
+ 1. get the descriptor from the relevant render graph resource
94
+ 2. modify only the fields that must change
95
+ 3. create the texture from that derived descriptor whenever possible
96
+
97
+ Examples:
98
+
99
+ ## Preferred
100
+ ```csharp
101
+ RenderTextureDescriptor desc = resourceData.activeColorTexture.GetDescriptor(renderGraph);
102
+ desc.depthBufferBits = 0;
103
+ desc.name = "New name";
104
+ // other desired paramters
105
+ passData.targetTexture = renderGraph.CreateTexture(desc);
106
+ ```
107
+
108
+ # 5. Manual Copy Pass Simplification
109
+ Check that:
110
+ - simple texture copy operations are not implemented as full custom raster passes when a built-in Render Graph helper is sufficient
111
+ - passes that only read one texture and write it unchanged to another target are simplified where appropriate
112
+ - the implementation prefers the most appropriate built-in helper for the target API/platform context
113
+ - `AddCopyPass(...)` is not recommended by default if a more compatible `AddBlitPass(...)` overload should be preferred in the current environment
114
+
115
+ Flag as an issue when:
116
+ - a raster pass exists only to copy one texture into another
117
+ - the pass uses no material and no custom processing
118
+ - the render function only performs a simple blit/copy equivalent
119
+ - the implementation uses a full custom raster pass where a built-in copy/blit helper would express the same behavior more directly
120
+
121
+ Prefer:
122
+ - the appropriate `AddBlitPass(...)` overload for straightforward copy-like operations when that is the recommended and more compatible path
123
+ - `AddCopyPass(...)` only when it is explicitly appropriate and supported for the target API/platform context
124
+ - a custom raster pass only when the copy requires additional logic or non-trivial behavior
125
+
126
+ # 6. Manual Blit Pass Simplification
127
+ Check that:
128
+ - straightforward fullscreen material blits are not implemented as custom raster passes when `renderGraph.AddBlitPass(...)` would express the same behavior more directly
129
+ - custom raster passes are only used for blits when additional logic or non-trivial behavior is actually required
130
+ - simple source-to-destination material blits use the most direct render graph helper available
131
+
132
+ Flag as an issue when:
133
+ - a raster pass reads one source texture and writes one destination texture
134
+ - the pass uses a material but no additional custom pass logic
135
+ - the render function only performs a simple fullscreen blit
136
+ - `renderGraph.AddBlitPass(...)` would provide an equivalent result more clearly
137
+
138
+ Prefer:
139
+ - `renderGraph.AddBlitPass(...)` for straightforward fullscreen material blits
140
+ - a custom raster pass only when extra logic, multiple operations, conditional behavior, or special setup is actually required
141
+
142
+ # 7. Global Resource Exposure
143
+ Check that:
144
+ - textures and buffers are not exposed globally unless explicitly requested or clearly required by a downstream consumer
145
+ - when global exposure is required in a render graph pass, the implementation uses the appropriate render graph publication mechanism
146
+ - direct command buffer global state mutation is not used as a substitute for render graph resource publication
147
+ - global exposure is not extending resource lifetime unnecessarily or reducing aliasing opportunities without justification
148
+
149
+ Flag as an issue when:
150
+ - `SetGlobalTextureAfterPass` is used without a clear consumer
151
+ - `context.cmd.SetGlobalTexture(...)` is used inside a render graph pass where render graph resource publication is the appropriate mechanism
152
+ - global exposure is used as a convenience shortcut instead of explicit pass-to-pass wiring
153
+ - hidden coupling is introduced unnecessarily
154
+ - a globally exposed texture may be kept alive longer than necessary due to downstream `UseGlobalTexture(...)` or `UseAllGlobalTextures()` usage, increasing memory pressure or reducing aliasing opportunities
155
+
156
+ Prefer:
157
+ - no global exposure by default
158
+ - explicit resource wiring where possible
159
+ - `builder.SetGlobalTextureAfterPass(...)` only when global publication is truly required in render graph
160
+ - resource lifetimes that remain as local and short-lived as possible
161
+
162
+ # 8. Renderer Feature Input Declaration
163
+ Check that:
164
+ - the `ScriptableRendererFeature` and its associated pass declare required pipeline inputs using `ConfigureInput(...)` when needed
165
+ - the requested input flags match the feature’s intended behavior and visible resource usage
166
+ - the pass does not rely on pipeline-provided inputs without declaring them when required by the target API pattern
167
+ - unnecessary input requests are not declared by default, especially when they may introduce extra copies, intermediate resources, or avoidable pipeline work
168
+
169
+ Flag as an issue when:
170
+ - the feature’s pass uses or is clearly intended to use a pipeline-provided input but does not declare it with `ConfigureInput(...)`
171
+ - `ConfigureInput(...)` requests inputs that the feature/pass does not appear to use
172
+ - the declared input flags do not match the intended effect behavior
173
+ - the effect description, code, and declared inputs imply conflicting requirements
174
+ - unnecessary declared inputs may force extra copies, extra pass work, or other avoidable performance costs
175
+
176
+ Classification guidance:
177
+ - mark as a **confirmed issue** when the code clearly shows a required input is used but not declared
178
+ - mark as a **likely issue** when the intended effect implies a required input but the visible code does not fully prove shader/resource usage
179
+ - treat unnecessary input declarations as higher severity when they are likely to introduce additional copies or other measurable runtime cost