@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.
- package/CHANGELOG.md +53 -0
- package/LICENSE-UNITY-COMPANION.md +122 -0
- package/LICENSE.md +31 -0
- package/NOTICE.md +90 -0
- package/README.md +273 -2
- package/cordis.patch.yml +22 -0
- package/docs/design.md +297 -0
- package/icon.svg +16 -0
- package/lib/frontmatter.js +392 -0
- package/lib/gating.js +105 -0
- package/lib/harness.js +16 -0
- package/lib/index.js +171 -0
- package/lib/project.js +210 -0
- package/lib/registry.js +268 -0
- package/lib/requirements.js +214 -0
- package/lib/skills.js +191 -0
- package/lib/types/frontmatter.d.ts +84 -0
- package/lib/types/gating.d.ts +80 -0
- package/lib/types/harness.d.ts +152 -0
- package/lib/types/index.d.ts +75 -0
- package/lib/types/project.d.ts +93 -0
- package/lib/types/registry.d.ts +96 -0
- package/lib/types/requirements.d.ts +67 -0
- package/lib/types/skills.d.ts +54 -0
- package/lib/types/watch.d.ts +34 -0
- package/lib/watch.js +84 -0
- package/locale/en.json +6 -0
- package/locale/zh.json +6 -0
- package/package.json +70 -4
- package/skills/2d-pixel-perfect/SKILL.md +208 -0
- package/skills/2d-pixel-perfect/references/api-reference.md +81 -0
- package/skills/2d-pixel-perfect/references/camera-setup-builtin.cs +40 -0
- package/skills/2d-pixel-perfect/references/camera-setup-urp.cs +49 -0
- package/skills/2d-pixel-perfect/references/pipeline-detection.cs +50 -0
- package/skills/2d-pixel-perfect/references/sprite-settings.cs +37 -0
- package/skills/asset-transformer-toolkit/SECURITY.md +15 -0
- package/skills/asset-transformer-toolkit/SKILL.md +39 -0
- package/skills/asset-transformer-toolkit/references/create-importer.md +121 -0
- package/skills/asset-transformer-toolkit/references/lods.md +61 -0
- package/skills/asset-transformer-toolkit/references/rule-api.md +154 -0
- package/skills/asset-transformer-toolkit/references/ruleblock-api.md +37 -0
- package/skills/asset-transformer-toolkit/references/ruleset-api.md +138 -0
- package/skills/asset-transformer-toolkit/references/rulesets-and-actions.md +227 -0
- package/skills/audio-setup-mixers/SECURITY.md +16 -0
- package/skills/audio-setup-mixers/SKILL.md +127 -0
- package/skills/audio-setup-mixers/references/api.md +162 -0
- package/skills/build-gtk/SECURITY.md +16 -0
- package/skills/build-gtk/SKILL.md +200 -0
- package/skills/build-gtk/references/api-reference.md +33 -0
- package/skills/build-gtk/references/graph-api-gaps.md +96 -0
- package/skills/build-gtk/references/runtime-and-visualization.md +191 -0
- package/skills/build-gtk/references/state-machine-api.md +270 -0
- package/skills/build-gtk/references/where-the-docs-stop.md +49 -0
- package/skills/build-live-game/SKILL.md +159 -0
- package/skills/build-live-game/references/achievements.md +757 -0
- package/skills/build-live-game/references/apis.md +271 -0
- package/skills/build-live-game/references/authentication.md +431 -0
- package/skills/build-live-game/references/battlepass.md +904 -0
- package/skills/build-live-game/references/blueprints-and-samples.md +75 -0
- package/skills/build-live-game/references/cloud-code-cloudbehaviours.md +1111 -0
- package/skills/build-live-game/references/cloud-code-modules.md +1276 -0
- package/skills/build-live-game/references/cloud-code.md +58 -0
- package/skills/build-live-game/references/cloud-save.md +464 -0
- package/skills/build-live-game/references/deployment.md +231 -0
- package/skills/build-live-game/references/orientation.md +30 -0
- package/skills/build-live-game/references/player-account.md +821 -0
- package/skills/build-live-game/references/remote-config.md +96 -0
- package/skills/build-live-game/references/services-overview.md +76 -0
- package/skills/build-live-game/references/tooling.md +375 -0
- package/skills/build-live-game/references/ugs-cli.md +86 -0
- package/skills/craft-game-floors/SECURITY.md +23 -0
- package/skills/craft-game-floors/SKILL.md +134 -0
- package/skills/craft-game-floors/references/art-direction.md +85 -0
- package/skills/craft-game-floors/references/camera-rigs.md +51 -0
- package/skills/craft-game-floors/references/character-motion.md +35 -0
- package/skills/craft-game-floors/references/game-audio.md +47 -0
- package/skills/craft-game-floors/references/game-feel.md +68 -0
- package/skills/craft-game-floors/references/game-shell.md +45 -0
- package/skills/craft-game-floors/references/live-floor.md +35 -0
- package/skills/craft-game-floors/references/placeholder-assets.md +35 -0
- package/skills/craft-game-floors/references/scene-lighting.md +52 -0
- package/skills/craft-game-floors/references/toon-shading.md +34 -0
- package/skills/craft-game-floors/references/vfx.md +40 -0
- package/skills/craft-game-floors/references/visual-scorecard.md +43 -0
- package/skills/create-2d-physics/SECURITY.md +16 -0
- package/skills/create-2d-physics/SKILL.md +128 -0
- package/skills/create-2d-physics/references/2d-physics-core.md +155 -0
- package/skills/create-2d-physics/references/legacy-2d-physics.md +45 -0
- package/skills/create-tile-palette-or-rule-tiles/SKILL.md +95 -0
- package/skills/create-tile-palette-or-rule-tiles/references/hexagonalruletile.md +71 -0
- package/skills/create-tile-palette-or-rule-tiles/references/palette-create.md +38 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createempty.md +37 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile-createfromsegment.md +219 -0
- package/skills/create-tile-palette-or-rule-tiles/references/ruletile.md +95 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/CreatePaletteTemplate.cs +148 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/ManualWorkflowExample.cs +63 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/RuleTileGenerator.cs +61 -0
- package/skills/create-tile-palette-or-rule-tiles/scripts/TilemapRuleTileCreateFromSegment.cs +225 -0
- package/skills/fix-3d-physics-collisions/SECURITY.md +17 -0
- package/skills/fix-3d-physics-collisions/SKILL.md +139 -0
- package/skills/fix-3d-physics-collisions/references/collision-checklist.md +80 -0
- package/skills/fix-3d-physics-collisions/references/collision-debugger.md +18 -0
- package/skills/fix-3d-physics-collisions/references/console-errors-table.md +9 -0
- package/skills/fix-3d-physics-collisions/references/kinematic-trigger-facts.md +18 -0
- package/skills/fix-3d-physics-collisions/references/other-symptoms.md +29 -0
- package/skills/fix-3d-physics-collisions/references/raycast-checklist.md +8 -0
- package/skills/fix-3d-physics-collisions/references/topic-map.md +42 -0
- package/skills/fix-3d-physics-collisions/references/trigger-checklist.md +9 -0
- package/skills/fix-3d-physics-collisions/scripts/CollisionDebugger.cs +561 -0
- package/skills/generate-editor-search-query/SECURITY.md +17 -0
- package/skills/generate-editor-search-query/SKILL.md +117 -0
- package/skills/generate-editor-search-query/references/open-search-window.md +70 -0
- package/skills/generate-editor-search-query/references/query-patterns.md +124 -0
- package/skills/implement-in-app-purchases/SKILL.md +82 -0
- package/skills/implement-in-app-purchases/references/api-details.md +41 -0
- package/skills/implement-in-app-purchases/references/api-notes.md +105 -0
- package/skills/implement-in-app-purchases/references/codeless-catalog.md +197 -0
- package/skills/implement-in-app-purchases/references/convert-adapty.md +270 -0
- package/skills/implement-in-app-purchases/references/convert-essentialkit.md +239 -0
- package/skills/implement-in-app-purchases/references/convert-revenuecat.md +277 -0
- package/skills/implement-in-app-purchases/references/convert-unipay.md +145 -0
- package/skills/implement-in-app-purchases/references/migration-v4-to-v5.md +46 -0
- package/skills/implement-in-app-purchases/references/path-add-iap-to-new-project.md +197 -0
- package/skills/implement-in-app-purchases/references/path-convert-native-google-billing.md +302 -0
- package/skills/implement-in-app-purchases/references/path-convert-native-storekit.md +357 -0
- package/skills/implement-in-app-purchases/references/path-implement-iap-d2c.md +253 -0
- package/skills/implement-in-app-purchases/references/platform-notes.md +55 -0
- package/skills/implement-in-app-purchases/references/pre-check.md +207 -0
- package/skills/implement-in-app-purchases/references/topic-map.md +46 -0
- package/skills/initialize-ai-navigation/SKILL.md +109 -0
- package/skills/initialize-ai-navigation/references/navigation-system.md +793 -0
- package/skills/initialize-ai-navigation/references/topic-map.md +66 -0
- package/skills/levelplay-unity-integration/SKILL.md +122 -0
- package/skills/levelplay-unity-integration/references/adding-more-ad-formats.md +15 -0
- package/skills/levelplay-unity-integration/references/banner-api.md +927 -0
- package/skills/levelplay-unity-integration/references/best-practices.md +604 -0
- package/skills/levelplay-unity-integration/references/dependency-resolution.md +94 -0
- package/skills/levelplay-unity-integration/references/examples.md +10 -0
- package/skills/levelplay-unity-integration/references/ilrd-api.md +337 -0
- package/skills/levelplay-unity-integration/references/initialization-api.md +851 -0
- package/skills/levelplay-unity-integration/references/interstitial-api.md +907 -0
- package/skills/levelplay-unity-integration/references/ios-setup.md +463 -0
- package/skills/levelplay-unity-integration/references/migration-sdk-9.md +666 -0
- package/skills/levelplay-unity-integration/references/privacy-settings.md +593 -0
- package/skills/levelplay-unity-integration/references/production-release-checklist.md +22 -0
- package/skills/levelplay-unity-integration/references/rewarded-api.md +918 -0
- package/skills/levelplay-unity-integration/references/step-0-new-or-migration.md +8 -0
- package/skills/levelplay-unity-integration/references/step-1-verify-environment.md +4 -0
- package/skills/levelplay-unity-integration/references/step-10-testing.md +15 -0
- package/skills/levelplay-unity-integration/references/step-2-business-goals.md +12 -0
- package/skills/levelplay-unity-integration/references/step-3-install-sdk.md +55 -0
- package/skills/levelplay-unity-integration/references/step-4-native-dependencies.md +22 -0
- package/skills/levelplay-unity-integration/references/step-5-app-key-and-ad-units.md +18 -0
- package/skills/levelplay-unity-integration/references/step-6-5-privacy-and-regulation.md +51 -0
- package/skills/levelplay-unity-integration/references/step-6-admob-keys.md +16 -0
- package/skills/levelplay-unity-integration/references/step-7-initialize.md +50 -0
- package/skills/levelplay-unity-integration/references/step-8-ad-unit-strategy.md +16 -0
- package/skills/levelplay-unity-integration/references/step-9-implement-ad-units.md +66 -0
- package/skills/levelplay-unity-integration/references/testing-and-validation.md +222 -0
- package/skills/levelplay-unity-integration/references/troubleshooting.md +99 -0
- package/skills/localize-unity-project/SKILL.md +159 -0
- package/skills/localize-unity-project/references/api-notes.md +15 -0
- package/skills/localize-unity-project/references/cjk-fonts.md +83 -0
- package/skills/localize-unity-project/references/docs-map.md +42 -0
- package/skills/localize-unity-project/references/documentation-lookup.md +33 -0
- package/skills/localize-unity-project/references/locale-switching.md +17 -0
- package/skills/localize-unity-project/references/table-completeness-check.md +47 -0
- package/skills/localize-unity-project/references/translating-existing-project.md +47 -0
- package/skills/localize-unity-project/references/translation-strategy.md +41 -0
- package/skills/localize-unity-project/references/troubleshooting.md +12 -0
- package/skills/localize-unity-project/scripts/L10nBatchProcessor.cs +191 -0
- package/skills/localize-unity-project/scripts/LocalizedFontAsset.cs +18 -0
- package/skills/manage-sprite-atlas/SKILL.md +202 -0
- package/skills/manage-sprite-atlas/references/addressables-delivery.md +58 -0
- package/skills/manage-sprite-atlas/references/advanced-manual-authoring.md +19 -0
- package/skills/manage-sprite-atlas/references/api.md +382 -0
- package/skills/manage-sprite-atlas/references/best-practices.md +183 -0
- package/skills/manage-sprite-atlas/references/common-errors.md +123 -0
- package/skills/manage-sprite-atlas/references/complete-workflow.md +61 -0
- package/skills/manage-sprite-atlas/references/custom-packing.md +147 -0
- package/skills/manage-sprite-atlas/references/delivery-mechanism.md +30 -0
- package/skills/manage-sprite-atlas/references/key-requirements.md +21 -0
- package/skills/manage-sprite-atlas/references/manual-authoring.md +39 -0
- package/skills/manage-sprite-atlas/references/namespaces.md +15 -0
- package/skills/manage-sprite-atlas/references/v2-architecture.md +21 -0
- package/skills/manage-sprite-atlas/resources/authoringvsruntime.cs +176 -0
- package/skills/manage-sprite-atlas/resources/buildaddressablespostprocess.cs +59 -0
- package/skills/manage-sprite-atlas/resources/cacheloadedatlases.cs +145 -0
- package/skills/manage-sprite-atlas/resources/cleanupbatchoperations.cs +119 -0
- package/skills/manage-sprite-atlas/resources/createandconfiguremasteratlas.cs +57 -0
- package/skills/manage-sprite-atlas/resources/custompackersetup.cs +88 -0
- package/skills/manage-sprite-atlas/resources/deprecatedmethods.cs +142 -0
- package/skills/manage-sprite-atlas/resources/dontmodifywithoutsaving.cs +120 -0
- package/skills/manage-sprite-atlas/resources/dontpackinruntimebuilds.cs +190 -0
- package/skills/manage-sprite-atlas/resources/dontscriptspriteatlasineditor.cs +114 -0
- package/skills/manage-sprite-atlas/resources/editorconfiguration.cs +95 -0
- package/skills/manage-sprite-atlas/resources/enablespritepacking.cs +172 -0
- package/skills/manage-sprite-atlas/resources/gridspritepacker.cs +50 -0
- package/skills/manage-sprite-atlas/resources/handlelatebinding.cs +147 -0
- package/skills/manage-sprite-atlas/resources/handlenullcases.cs +141 -0
- package/skills/manage-sprite-atlas/resources/migratev1tov2.cs +335 -0
- package/skills/manage-sprite-atlas/resources/multipagepacker.cs +80 -0
- package/skills/manage-sprite-atlas/resources/optimizetexturesettings.cs +191 -0
- package/skills/manage-sprite-atlas/resources/packerdebugging.cs +158 -0
- package/skills/manage-sprite-atlas/resources/packtransform.cs +51 -0
- package/skills/manage-sprite-atlas/resources/platformnames.cs +127 -0
- package/skills/manage-sprite-atlas/resources/queryspritesefficiently.cs +222 -0
- package/skills/manage-sprite-atlas/resources/registercallbacks.cs +152 -0
- package/skills/manage-sprite-atlas/resources/runtimeatlasloader.cs +15 -0
- package/skills/manage-sprite-atlas/resources/runtimespriteaccess.cs +19 -0
- package/skills/manage-sprite-atlas/resources/savespriteatlasasset.cs +107 -0
- package/skills/manage-sprite-atlas/resources/scriptablepacker.cs +81 -0
- package/skills/manage-sprite-atlas/resources/setincludeinbuild.cs +164 -0
- package/skills/manage-sprite-atlas/resources/sizeoptimizedpacker.cs +88 -0
- package/skills/manage-sprite-atlas/resources/spriteatlaslatebinding.cs +123 -0
- package/skills/manage-sprite-atlas/resources/spriteatlasprebuildgenerator.cs +219 -0
- package/skills/manage-sprite-atlas/resources/spritedata.cs +35 -0
- package/skills/manage-sprite-atlas/resources/spritepack.cs +39 -0
- package/skills/manage-sprite-atlas/resources/texturedata.cs +15 -0
- package/skills/manage-sprite-atlas/resources/updatebuildscripts.cs +357 -0
- package/skills/manage-sprite-atlas/resources/updatesettingsconfiguration.cs +135 -0
- package/skills/manage-sprite-atlas/resources/usevariantswisely.cs +179 -0
- package/skills/manage-sprite-atlas/resources/variantatlas.cs +39 -0
- package/skills/migrate-birp-to-urp/SECURITY.md +16 -0
- package/skills/migrate-birp-to-urp/SKILL.md +167 -0
- package/skills/migrate-birp-to-urp/references/capturing-the-editor.md +66 -0
- package/skills/migrate-birp-to-urp/references/complex-shader-situations.md +272 -0
- package/skills/migrate-birp-to-urp/references/conversion-and-rendering-triage.md +113 -0
- package/skills/migrate-birp-to-urp/references/custom-shader-triage.md +123 -0
- package/skills/migrate-birp-to-urp/references/implementation-patterns.md +529 -0
- package/skills/migrate-birp-to-urp/references/migration-workflow.md +265 -0
- package/skills/migrate-birp-to-urp/references/parity-validation-and-troubleshooting.md +114 -0
- package/skills/migrate-birp-to-urp/references/preflight-and-urp-setup.md +195 -0
- package/skills/migrate-birp-to-urp/references/quality-settings-map.md +69 -0
- package/skills/new-unity-project/SECURITY.md +26 -0
- package/skills/new-unity-project/SKILL.md +171 -0
- package/skills/new-unity-project/references/checklist.md +18 -0
- package/skills/new-unity-project/references/common-mistakes.md +15 -0
- package/skills/new-unity-project/references/skill-setup.md +66 -0
- package/skills/new-unity-project/references/step-1-concept.md +13 -0
- package/skills/new-unity-project/references/step-2-platforms-and-create.md +31 -0
- package/skills/new-unity-project/references/step-3-join-and-reconcile.md +16 -0
- package/skills/new-unity-project/references/step-4-source-control.md +9 -0
- package/skills/new-unity-project/references/step-5-packages.md +18 -0
- package/skills/new-unity-project/references/step-6-identity-and-floors.md +20 -0
- package/skills/new-unity-project/references/step-7-visual-baseline.md +75 -0
- package/skills/new-unity-project/references/step-8-first-commit.md +21 -0
- package/skills/new-unity-project/references/step-9-handoff.md +23 -0
- package/skills/optimize-audio/SECURITY.md +16 -0
- package/skills/optimize-audio/SKILL.md +120 -0
- package/skills/optimize-audio/references/diagnostics.md +42 -0
- package/skills/optimize-audio/references/troubleshooting.md +41 -0
- package/skills/optimize-audio/resources/audio-import-api.md +149 -0
- package/skills/optimize-audio/resources/platform-settings.md +48 -0
- package/skills/optimize-text-mesh-pro/SKILL.md +181 -0
- package/skills/optimize-text-mesh-pro/references/dynamic-atlas-and-profiling.md +28 -0
- package/skills/optimize-text-mesh-pro/references/topic-map.md +36 -0
- package/skills/optimize-web/SECURITY.md +16 -0
- package/skills/optimize-web/SKILL.md +157 -0
- package/skills/optimize-web/references/editor-csharp.md +120 -0
- package/skills/optimize-web/references/topic-map.md +49 -0
- package/skills/optimize-web/references/troubleshooting.md +45 -0
- package/skills/optimize-web/references/understand-request.md +19 -0
- package/skills/optimize-web/references/web-assets-quality.md +59 -0
- package/skills/optimize-web/references/web-player-settings.md +39 -0
- package/skills/optimize-web/references/web-profiling-memory.md +71 -0
- package/skills/optimize-web/scripts/WebOptimizer.cs +46 -0
- package/skills/optimize-web/scripts/toktx-examples.sh +11 -0
- package/skills/setup-multiplayer-services/SKILL.md +36 -0
- package/skills/setup-multiplayer-services/references/dgs-entrypoint.md +79 -0
- package/skills/setup-multiplayer-services/references/entrypoints.md +213 -0
- package/skills/setup-multiplayer-services/references/examples.md +33 -0
- package/skills/setup-multiplayer-services/references/implementation-fit.md +30 -0
- package/skills/setup-multiplayer-services/references/underlying-services.md +11 -0
- package/skills/setup-multiplayer-services/references/workflows-prerequisites.md +17 -0
- package/skills/setup-vivox-voice-chat/SECURITY.md +16 -0
- package/skills/setup-vivox-voice-chat/SKILL.md +166 -0
- package/skills/setup-vivox-voice-chat/references/api-reference-lookup.md +28 -0
- package/skills/setup-vivox-voice-chat/references/docs-topic-map.md +13 -0
- package/skills/setup-vivox-voice-chat/references/events-and-participants.md +79 -0
- package/skills/setup-vivox-voice-chat/references/init-and-login.md +92 -0
- package/skills/setup-vivox-voice-chat/references/text-chat.md +93 -0
- package/skills/setup-vivox-voice-chat/references/troubleshooting.md +47 -0
- package/skills/setup-vivox-voice-chat/references/voice-channels.md +92 -0
- package/skills/shader-graph-create-custom-node/SKILL.md +25 -0
- package/skills/shader-graph-create-custom-node/resources/all_hints.hlsl +182 -0
- package/skills/sprite-editor/SECURITY.md +16 -0
- package/skills/sprite-editor/SKILL.md +66 -0
- package/skills/sprite-editor/references/api_reference.md +151 -0
- package/skills/sprite-editor/references/background.md +112 -0
- package/skills/sprite-editor/references/templates.md +72 -0
- package/skills/sprite-editor/scripts/AutomaticSliceTexture.cs +40 -0
- package/skills/sprite-editor/scripts/GenerateNewSpriteRects.cs +200 -0
- package/skills/sprite-editor/scripts/GetTextureSourceImageSize.cs +32 -0
- package/skills/sprite-editor/scripts/GetTextureToSlice.cs +55 -0
- package/skills/sprite-editor/scripts/GridSliceTexture.cs +40 -0
- package/skills/sprite-editor/scripts/IsometricSliceTexture.cs +141 -0
- package/skills/sprite-editor/scripts/README.md +134 -0
- package/skills/sprite-editor/scripts/SetPivotExample.cs +58 -0
- package/skills/sprite-editor/scripts/SpriteToPng.cs +88 -0
- package/skills/sprite-segment-3x3grid/SKILL.md +177 -0
- package/skills/sprite-segment-3x3grid/references/topic-map.md +37 -0
- package/skills/sprite-segment-3x3grid/scripts/SpriteGridAnalysis.cs +119 -0
- package/skills/ui/SKILL.md +142 -0
- package/skills/ui-imgui/SKILL.md +180 -0
- package/skills/ui-imgui/references/gui-elements.md +156 -0
- package/skills/ui-imgui/references/templates.md +141 -0
- package/skills/ui-ugui/SKILL.md +217 -0
- package/skills/ui-ugui/references/layout-and-anchors.md +61 -0
- package/skills/ui-ugui/references/scrollview-setup.md +29 -0
- package/skills/ui-uitk/SKILL.md +229 -0
- package/skills/ui-uitk/references/common-issues.md +74 -0
- package/skills/ui-uitk/references/custom-elements.md +241 -0
- package/skills/ui-uitk/references/painter2d.md +282 -0
- package/skills/ui-uitk/references/pointermanipulator-guide.md +94 -0
- package/skills/ui-uitk/references/svg-icons.md +136 -0
- package/skills/ui-uitk/references/ui-runtime-binding.md +234 -0
- package/skills/ui-uitk/references/uss-guide.md +138 -0
- package/skills/unity-cli/CHANGELOG.md +524 -0
- package/skills/unity-cli/SECURITY.md +68 -0
- package/skills/unity-cli/SKILL.md +160 -0
- package/skills/unity-cli/references/auth-license-cloud.md +318 -0
- package/skills/unity-cli/references/bootstrap-project.md +177 -0
- package/skills/unity-cli/references/build-run-test.md +555 -0
- package/skills/unity-cli/references/catalog-plugins.md +86 -0
- package/skills/unity-cli/references/ci-recipes.md +76 -0
- package/skills/unity-cli/references/cloud-automation.md +819 -0
- package/skills/unity-cli/references/cloud-workflows.md +19 -0
- package/skills/unity-cli/references/collaboration.md +533 -0
- package/skills/unity-cli/references/config-hub.md +239 -0
- package/skills/unity-cli/references/diagnostics-maintenance.md +718 -0
- package/skills/unity-cli/references/docs-workflow.md +179 -0
- package/skills/unity-cli/references/editor-targeting.md +29 -0
- package/skills/unity-cli/references/editors-install.md +490 -0
- package/skills/unity-cli/references/environment-variables.md +42 -0
- package/skills/unity-cli/references/exit-codes.md +47 -0
- package/skills/unity-cli/references/global-flags.md +32 -0
- package/skills/unity-cli/references/integration-advanced.md +1130 -0
- package/skills/unity-cli/references/notes.md +20 -0
- package/skills/unity-cli/references/notifications.md +39 -0
- package/skills/unity-cli/references/playmode-verification-loop.md +279 -0
- package/skills/unity-cli/references/projects-templates.md +997 -0
- package/skills/unity-cli/references/scene-editing-preflight.md +25 -0
- package/skills/unity-cli/references/setup-and-help.md +54 -0
- package/skills/unity-cli/references/version-control.md +612 -0
- package/skills/unity-package-management/SKILL.md +169 -0
- package/skills/unity-package-management/references/discovering-packages.md +66 -0
- package/skills/unity-package-management/references/headless-run.md +31 -0
- package/skills/unity-package-management/references/installer-script.md +92 -0
- package/skills/unity-package-management/references/select-packages.md +126 -0
- package/skills/unity-pipeline/SECURITY.md +17 -0
- package/skills/unity-pipeline/SKILL.md +205 -0
- package/skills/unity-pipeline/references/csharp-eval.md +23 -0
- package/skills/unity-pipeline/references/multiplayer-play-mode.md +103 -0
- package/skills/urp-postprocessing/SECURITY.md +16 -0
- package/skills/urp-postprocessing/SKILL.md +188 -0
- package/skills/urp-postprocessing/references/code-templates.md +150 -0
- package/skills/urp-postprocessing/references/effect-reference.md +86 -0
- package/skills/validate-urp-render-graph-renderer-feature/SKILL.md +92 -0
- package/skills/validate-urp-render-graph-renderer-feature/references/validation-checklist.md +179 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Per-agent skill provider registry.
|
|
3
|
+
*
|
|
4
|
+
* A bundle row lands in the harness's global scope layer, while an agent preset
|
|
5
|
+
* mounts its own skill provider in the agent's layer — and the nearest layer wins
|
|
6
|
+
* a duplicate name outright, regardless of rank. Registering from a bundle row
|
|
7
|
+
* alone therefore loses to whatever the preset already sees, and cannot vary by
|
|
8
|
+
* project. Registering through `agent.ctx` instead places this provider in that
|
|
9
|
+
* agent's layer: it wins the names it owns, and its catalog can depend on the
|
|
10
|
+
* project the agent is actually working in.
|
|
11
|
+
*
|
|
12
|
+
* This module keeps that bookkeeping: one shared reader and parse cache, one fact
|
|
13
|
+
* cache per working directory, and one registration per live agent. It also
|
|
14
|
+
* implements the provider itself, which re-reads the project facts whenever the
|
|
15
|
+
* harness asks for the catalog, so a changed editor version or package list
|
|
16
|
+
* invalidates the catalog instead of waiting for a restart.
|
|
17
|
+
*
|
|
18
|
+
* @module dsh-unity/lib/registry
|
|
19
|
+
*/
|
|
20
|
+
import type { DetectOptions, ProjectFacts } from './project.ts';
|
|
21
|
+
import type { ReaderOptions, UnitySkillReader } from './skills.ts';
|
|
22
|
+
import type { AgentLike, PluginContext, SessionLike, SkillProvider } from './harness.ts';
|
|
23
|
+
/** How long detected project facts stay fresh before they are read again. */
|
|
24
|
+
export declare const FACTS_TTL_MS = 2000;
|
|
25
|
+
/** Settings the registry needs; the plugin entry point supplies them. */
|
|
26
|
+
export interface RegistrySettings {
|
|
27
|
+
readonly skillDir: string;
|
|
28
|
+
readonly providerName: string;
|
|
29
|
+
readonly source: string;
|
|
30
|
+
readonly rank: number;
|
|
31
|
+
readonly exclude: ReadonlySet<string>;
|
|
32
|
+
readonly respectProjectRoots: boolean;
|
|
33
|
+
readonly injectContext: boolean;
|
|
34
|
+
readonly workspaceSkills: ReadonlySet<string>;
|
|
35
|
+
readonly gateByProject: boolean;
|
|
36
|
+
readonly enforceRequirements: boolean;
|
|
37
|
+
readonly parseCache: ReaderOptions['parseCache'];
|
|
38
|
+
}
|
|
39
|
+
/** Options for {@link createAgentRegistry}. */
|
|
40
|
+
export interface RegistryOptions {
|
|
41
|
+
readonly ctx: PluginContext;
|
|
42
|
+
readonly settings: RegistrySettings;
|
|
43
|
+
readonly reader?: UnitySkillReader;
|
|
44
|
+
readonly detect?: (cwd: string) => Promise<ProjectFacts | undefined>;
|
|
45
|
+
readonly readProjectSkills?: (root: string) => Promise<Set<string>>;
|
|
46
|
+
}
|
|
47
|
+
/** The result of trying to register one agent. */
|
|
48
|
+
export type RegistrationResult = 'registered' | 'unavailable' | 'skipped';
|
|
49
|
+
/** The registry handed to the plugin entry point. */
|
|
50
|
+
export interface AgentRegistry {
|
|
51
|
+
readonly reader: UnitySkillReader;
|
|
52
|
+
size(): number;
|
|
53
|
+
add(agent: AgentLike | undefined): Promise<RegistrationResult>;
|
|
54
|
+
remove(agent: AgentLike | undefined): void;
|
|
55
|
+
factsFor(cwd: string | undefined): Promise<ProjectFacts | undefined>;
|
|
56
|
+
projectSkillsFor(facts: ProjectFacts | undefined): Promise<Set<string>>;
|
|
57
|
+
invalidateAll(): void;
|
|
58
|
+
disposeAll(): void;
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Create the registry that owns every per-agent registration.
|
|
62
|
+
*
|
|
63
|
+
* @param options - registry settings and injectable collaborators.
|
|
64
|
+
* @returns the registry.
|
|
65
|
+
*/
|
|
66
|
+
export declare function createAgentRegistry(options: RegistryOptions): AgentRegistry;
|
|
67
|
+
/**
|
|
68
|
+
* Resolve an optional service from a context without requiring an injection.
|
|
69
|
+
*
|
|
70
|
+
* @param context - the context to read from, possibly an agent scope.
|
|
71
|
+
* @param name - service name.
|
|
72
|
+
* @returns the service, or `undefined` when unavailable.
|
|
73
|
+
*/
|
|
74
|
+
export declare function serviceOf<T>(context: {
|
|
75
|
+
get(name: string): unknown;
|
|
76
|
+
} | undefined, name: string): T | undefined;
|
|
77
|
+
/** Options passed to the real project detector. */
|
|
78
|
+
export declare function resolveDetectOptions(ctx: PluginContext): DetectOptions;
|
|
79
|
+
/**
|
|
80
|
+
* Build a single provider that resolves project facts from each lookup's `cwd`.
|
|
81
|
+
*
|
|
82
|
+
* Used as the fallback when a plugin context cannot reach `agent.ctx.skills`: the
|
|
83
|
+
* catalog still follows each lookup's working directory, but it registers in the
|
|
84
|
+
* global layer, where the nearest layer (the agent preset) wins a duplicate name.
|
|
85
|
+
* Context contribution stays agent-scoped, so a deployment on this path gets
|
|
86
|
+
* gating without the runtime-context line.
|
|
87
|
+
*
|
|
88
|
+
* @param options - settings and the registry whose caches are reused.
|
|
89
|
+
* @returns the provider to register globally.
|
|
90
|
+
*/
|
|
91
|
+
export declare function createGlobalProvider(options: {
|
|
92
|
+
settings: RegistrySettings;
|
|
93
|
+
registry: AgentRegistry;
|
|
94
|
+
}): SkillProvider;
|
|
95
|
+
/** Re-exported for callers that only need the session shape. */
|
|
96
|
+
export type { SessionLike };
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Unity version and UPM package requirement arithmetic.
|
|
3
|
+
*
|
|
4
|
+
* Skill frontmatter can state what the skill needs: `required_editor_version`
|
|
5
|
+
* (a range such as `>=6000.6`) and `required_packages` (a map of package id to
|
|
6
|
+
* range). The harness has no equivalent mechanism, so this module turns those
|
|
7
|
+
* declarations into a decision the plugin can act on: is the skill applicable to
|
|
8
|
+
* the project this agent is working in?
|
|
9
|
+
*
|
|
10
|
+
* Parsing is deliberately tolerant. A Unity editor version like `6000.3.14f1`
|
|
11
|
+
* becomes `[6000, 3, 14]` — the `f1` build suffix is information about the build
|
|
12
|
+
* channel, not ordering — while a package version keeps its prerelease tag.
|
|
13
|
+
* Anything unparseable is "unknown", and the caller treats unknown as *do not
|
|
14
|
+
* hide*: a declaration nobody can evaluate must not silently remove a skill.
|
|
15
|
+
*
|
|
16
|
+
* @module dsh-unity/lib/requirements
|
|
17
|
+
*/
|
|
18
|
+
import type { SkillRequirements } from './harness.ts';
|
|
19
|
+
/** A version split into comparable numeric segments. */
|
|
20
|
+
export interface ParsedVersion {
|
|
21
|
+
readonly segments: readonly number[];
|
|
22
|
+
readonly prerelease: string | undefined;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Parse a version string into comparable numeric segments.
|
|
26
|
+
*
|
|
27
|
+
* @param value - raw version such as `6000.3.14f1`, `17.5.0`, `1.2`.
|
|
28
|
+
* @returns the parsed version, or `undefined` when it is not a version.
|
|
29
|
+
*/
|
|
30
|
+
export declare function parseVersion(value: unknown): ParsedVersion | undefined;
|
|
31
|
+
/** Compare two parsed versions, padding the shorter one with zeros. */
|
|
32
|
+
export declare function compareVersions(left: ParsedVersion, right: ParsedVersion): number;
|
|
33
|
+
/**
|
|
34
|
+
* Check a range against a version.
|
|
35
|
+
*
|
|
36
|
+
* @param rawRange - range text, for example `>=6000.6`.
|
|
37
|
+
* @param rawVersion - version text, for example `6000.3.14f1`.
|
|
38
|
+
* @returns `undefined` when either side cannot be parsed, so the caller can treat
|
|
39
|
+
* the answer as unknown instead of hiding a skill.
|
|
40
|
+
*/
|
|
41
|
+
export declare function satisfiesRange(rawRange: unknown, rawVersion: unknown): boolean | undefined;
|
|
42
|
+
/**
|
|
43
|
+
* Read the requirement declarations out of parsed skill frontmatter.
|
|
44
|
+
*
|
|
45
|
+
* @param data - parsed SKILL.md frontmatter.
|
|
46
|
+
* @returns the declared editor range and package ranges.
|
|
47
|
+
*/
|
|
48
|
+
export declare function readRequirements(data: Readonly<Record<string, unknown>>): SkillRequirements;
|
|
49
|
+
/** Project facts that requirement checks depend on. */
|
|
50
|
+
export interface RequirementFacts {
|
|
51
|
+
readonly editorVersion?: string;
|
|
52
|
+
readonly packages?: Map<string, string>;
|
|
53
|
+
}
|
|
54
|
+
/** The outcome of evaluating one skill's requirements. */
|
|
55
|
+
export interface RequirementVerdict {
|
|
56
|
+
readonly applicable: boolean;
|
|
57
|
+
readonly unknown: boolean;
|
|
58
|
+
readonly reasons: readonly string[];
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Evaluate requirements against project facts.
|
|
62
|
+
*
|
|
63
|
+
* @param requirements - declarations from {@link readRequirements}.
|
|
64
|
+
* @param facts - detected project facts; `undefined` means no project was detected.
|
|
65
|
+
* @returns the decision; `applicable` stays true when the answer is only unknown.
|
|
66
|
+
*/
|
|
67
|
+
export declare function evaluateRequirements(requirements: SkillRequirements, facts: RequirementFacts | undefined): RequirementVerdict;
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Discovery and loading for the packaged Unity skills.
|
|
3
|
+
*
|
|
4
|
+
* Each skill is a directory bundle `<skillDir>/<name>/SKILL.md`, the same shape
|
|
5
|
+
* the harness filesystem provider reads, so the tree needs no transformation.
|
|
6
|
+
* Discovery parses frontmatter into a catalog candidate and every load re-reads
|
|
7
|
+
* the file, matching the harness convention that a skill body has no separate
|
|
8
|
+
* cache.
|
|
9
|
+
*
|
|
10
|
+
* One parse cache is shared by every agent's provider: discovery runs per agent
|
|
11
|
+
* scope, but the files belong to this package, so one cache keyed by path plus
|
|
12
|
+
* modification time and size keeps N agents from re-parsing the same documents
|
|
13
|
+
* while still noticing an edit.
|
|
14
|
+
*
|
|
15
|
+
* @module dsh-unity/lib/skills
|
|
16
|
+
*/
|
|
17
|
+
import type { SkillCandidate, SkillDefinition, SkillLookupOptions } from './harness.ts';
|
|
18
|
+
import type { ParsedSkill } from './frontmatter.ts';
|
|
19
|
+
/** Shared frontmatter cache keyed by file path. */
|
|
20
|
+
export interface ParseCache {
|
|
21
|
+
read(file: string): Promise<ParsedSkill | undefined>;
|
|
22
|
+
clear(): void;
|
|
23
|
+
}
|
|
24
|
+
/** Options one reader is created with. */
|
|
25
|
+
export interface ReaderOptions {
|
|
26
|
+
readonly skillDir: string;
|
|
27
|
+
readonly providerName: string;
|
|
28
|
+
readonly source: string;
|
|
29
|
+
readonly rank: number;
|
|
30
|
+
readonly exclude?: ReadonlySet<string>;
|
|
31
|
+
readonly parseCache?: ParseCache;
|
|
32
|
+
readonly logger: {
|
|
33
|
+
warn(message: string): void;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
/** The reader the provider delegates to. */
|
|
37
|
+
export interface UnitySkillReader {
|
|
38
|
+
readonly skillDir: string;
|
|
39
|
+
list(options?: SkillLookupOptions): Promise<SkillCandidate[]>;
|
|
40
|
+
load(candidate: SkillCandidate | undefined, options?: SkillLookupOptions): Promise<SkillDefinition | undefined>;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Create a frontmatter cache keyed by path and file identity.
|
|
44
|
+
*
|
|
45
|
+
* @returns the cache.
|
|
46
|
+
*/
|
|
47
|
+
export declare function createParseCache(): ParseCache;
|
|
48
|
+
/**
|
|
49
|
+
* Create a reader for one packaged skill directory.
|
|
50
|
+
*
|
|
51
|
+
* @param options - reader settings.
|
|
52
|
+
* @returns the reader.
|
|
53
|
+
*/
|
|
54
|
+
export declare function createUnitySkillReader(options: ReaderOptions): UnitySkillReader;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live catalog refresh for the packaged skills.
|
|
3
|
+
*
|
|
4
|
+
* Editing a skill body already takes effect on the next load, because loading
|
|
5
|
+
* re-reads the file. Adding, removing, or changing the frontmatter of a skill is
|
|
6
|
+
* different: the registry caches the discovered catalog per scope and only
|
|
7
|
+
* refreshes when a provider asks it to. This watcher bridges the filesystem to
|
|
8
|
+
* that contract, so a skill edit shows up in the next step instead of forcing a
|
|
9
|
+
* restart.
|
|
10
|
+
*
|
|
11
|
+
* Watching is optional and never load-bearing: a platform or sandbox that cannot
|
|
12
|
+
* watch leaves the plugin fully functional with restart-time discovery.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-unity/lib/watch
|
|
15
|
+
*/
|
|
16
|
+
/** Options for {@link startSkillsWatcher}. */
|
|
17
|
+
export interface WatcherOptions {
|
|
18
|
+
readonly dir: string;
|
|
19
|
+
readonly onChange: () => void;
|
|
20
|
+
readonly logger: {
|
|
21
|
+
warn(message: string): void;
|
|
22
|
+
};
|
|
23
|
+
readonly debounceMs?: number;
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Start watching a skill directory for catalog-relevant changes.
|
|
27
|
+
*
|
|
28
|
+
* Only `SKILL.md` additions, removals, and edits matter: resource files below a
|
|
29
|
+
* skill are read on demand and do not change discovery.
|
|
30
|
+
*
|
|
31
|
+
* @param options - watcher options.
|
|
32
|
+
* @returns a disposer that stops the watcher.
|
|
33
|
+
*/
|
|
34
|
+
export declare function startSkillsWatcher(options: WatcherOptions): () => void;
|
package/lib/watch.js
ADDED
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Live catalog refresh for the packaged skills.
|
|
3
|
+
*
|
|
4
|
+
* Editing a skill body already takes effect on the next load, because loading
|
|
5
|
+
* re-reads the file. Adding, removing, or changing the frontmatter of a skill is
|
|
6
|
+
* different: the registry caches the discovered catalog per scope and only
|
|
7
|
+
* refreshes when a provider asks it to. This watcher bridges the filesystem to
|
|
8
|
+
* that contract, so a skill edit shows up in the next step instead of forcing a
|
|
9
|
+
* restart.
|
|
10
|
+
*
|
|
11
|
+
* Watching is optional and never load-bearing: a platform or sandbox that cannot
|
|
12
|
+
* watch leaves the plugin fully functional with restart-time discovery.
|
|
13
|
+
*
|
|
14
|
+
* @module dsh-unity/lib/watch
|
|
15
|
+
*/
|
|
16
|
+
import { watch } from 'node:fs';
|
|
17
|
+
/** Default coalescing window for filesystem bursts. */
|
|
18
|
+
const DEFAULT_DEBOUNCE_MS = 200;
|
|
19
|
+
/**
|
|
20
|
+
* Start watching a skill directory for catalog-relevant changes.
|
|
21
|
+
*
|
|
22
|
+
* Only `SKILL.md` additions, removals, and edits matter: resource files below a
|
|
23
|
+
* skill are read on demand and do not change discovery.
|
|
24
|
+
*
|
|
25
|
+
* @param options - watcher options.
|
|
26
|
+
* @returns a disposer that stops the watcher.
|
|
27
|
+
*/
|
|
28
|
+
export function startSkillsWatcher(options) {
|
|
29
|
+
const { dir, onChange, logger, debounceMs = DEFAULT_DEBOUNCE_MS } = options;
|
|
30
|
+
let timer;
|
|
31
|
+
let watcher;
|
|
32
|
+
let disposed = false;
|
|
33
|
+
const schedule = () => {
|
|
34
|
+
if (disposed)
|
|
35
|
+
return;
|
|
36
|
+
if (timer !== undefined)
|
|
37
|
+
clearTimeout(timer);
|
|
38
|
+
timer = setTimeout(() => {
|
|
39
|
+
timer = undefined;
|
|
40
|
+
if (disposed)
|
|
41
|
+
return;
|
|
42
|
+
try {
|
|
43
|
+
onChange();
|
|
44
|
+
}
|
|
45
|
+
catch (error) {
|
|
46
|
+
logger.warn(`unity skills: catalog refresh failed: ${String(error)}`);
|
|
47
|
+
}
|
|
48
|
+
}, debounceMs);
|
|
49
|
+
timer.unref?.();
|
|
50
|
+
};
|
|
51
|
+
try {
|
|
52
|
+
watcher = watch(dir, { recursive: true, persistent: false }, (_event, filename) => {
|
|
53
|
+
if (filename === null || filename === undefined) {
|
|
54
|
+
schedule();
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
if (String(filename).endsWith('SKILL.md'))
|
|
58
|
+
schedule();
|
|
59
|
+
});
|
|
60
|
+
}
|
|
61
|
+
catch (error) {
|
|
62
|
+
logger.warn(`unity skills: cannot watch ${dir}, catalog changes need a restart: ${String(error)}`);
|
|
63
|
+
return () => { };
|
|
64
|
+
}
|
|
65
|
+
watcher.on('error', (error) => {
|
|
66
|
+
logger.warn(`unity skills: skill watcher stopped on ${dir}: ${String(error)}`);
|
|
67
|
+
dispose();
|
|
68
|
+
});
|
|
69
|
+
function dispose() {
|
|
70
|
+
if (disposed)
|
|
71
|
+
return;
|
|
72
|
+
disposed = true;
|
|
73
|
+
if (timer !== undefined)
|
|
74
|
+
clearTimeout(timer);
|
|
75
|
+
timer = undefined;
|
|
76
|
+
try {
|
|
77
|
+
watcher?.close();
|
|
78
|
+
}
|
|
79
|
+
catch {
|
|
80
|
+
// Closing an already-closed watcher is not an error worth surfacing.
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
return dispose;
|
|
84
|
+
}
|
package/locale/en.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
{
|
|
2
|
+
"meta": {
|
|
3
|
+
"title": "Unity skills",
|
|
4
|
+
"description": "34 Unity game-development skills covering editor tooling, UI, 2D and physics, audio and performance, rendering, multiplayer, monetization, and builds. Each session sees the skills its Unity project supports: three workspace skills outside a project, then editor-version and package requirements applied inside one, with the project facts added to the runtime context."
|
|
5
|
+
}
|
|
6
|
+
}
|
package/locale/zh.json
ADDED
package/package.json
CHANGED
|
@@ -1,6 +1,72 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aqian0/dsh-unity",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Unity game-development, monetization, and performance skills for DeepSeek Harness: 34 skills that load on demand, packaged as a DSH bundle.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"dsh-plugin",
|
|
7
|
+
"unity",
|
|
8
|
+
"gamedev",
|
|
9
|
+
"game-development"
|
|
10
|
+
],
|
|
11
|
+
"license": "(MIT AND ISC AND LicenseRef-Unity-Companion-License)",
|
|
12
|
+
"author": "AQian",
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/AQian0/dsh-unity.git"
|
|
16
|
+
},
|
|
17
|
+
"homepage": "https://github.com/AQian0/dsh-unity#readme",
|
|
18
|
+
"bugs": {
|
|
19
|
+
"url": "https://github.com/AQian0/dsh-unity/issues"
|
|
20
|
+
},
|
|
21
|
+
"type": "module",
|
|
22
|
+
"main": "lib/index.js",
|
|
23
|
+
"exports": {
|
|
24
|
+
".": {
|
|
25
|
+
"types": "./lib/types/index.d.ts",
|
|
26
|
+
"default": "./lib/index.js"
|
|
27
|
+
},
|
|
28
|
+
"./locale/*.json": "./locale/*.json",
|
|
29
|
+
"./icon": "./icon.svg",
|
|
30
|
+
"./cordis.patch.yml": "./cordis.patch.yml",
|
|
31
|
+
"./package.json": "./package.json"
|
|
32
|
+
},
|
|
33
|
+
"files": [
|
|
34
|
+
"lib/**/*.js",
|
|
35
|
+
"lib/types/**/*.d.ts",
|
|
36
|
+
"cordis.patch.yml",
|
|
37
|
+
"locale/*.json",
|
|
38
|
+
"skills/**",
|
|
39
|
+
"icon.svg",
|
|
40
|
+
"LICENSE.md",
|
|
41
|
+
"LICENSE-UNITY-COMPANION.md",
|
|
42
|
+
"NOTICE.md",
|
|
43
|
+
"CHANGELOG.md",
|
|
44
|
+
"README.md",
|
|
45
|
+
"docs/design.md"
|
|
46
|
+
],
|
|
47
|
+
"scripts": {
|
|
48
|
+
"build": "tsc -p tsconfig.json",
|
|
49
|
+
"clean": "node -e \"require('node:fs').rmSync('lib',{recursive:true,force:true})\"",
|
|
50
|
+
"prepack": "npm run clean && npm run build",
|
|
51
|
+
"prepublishOnly": "npm run typecheck && npm test && npm run validate",
|
|
52
|
+
"typecheck": "tsc -p tsconfig.test.json",
|
|
53
|
+
"test": "node --test \"test/**/*.test.ts\"",
|
|
54
|
+
"validate": "node scripts/validate-skills.ts"
|
|
55
|
+
},
|
|
56
|
+
"dsh": {
|
|
57
|
+
"bundle": {
|
|
58
|
+
"patch": "./cordis.patch.yml"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"devDependencies": {
|
|
62
|
+
"@types/node": "^26.6.5",
|
|
63
|
+
"typescript": "^7.0.2"
|
|
64
|
+
},
|
|
65
|
+
"types": "lib/types/index.d.ts",
|
|
66
|
+
"engines": {
|
|
67
|
+
"node": ">=22.18"
|
|
68
|
+
},
|
|
69
|
+
"publishConfig": {
|
|
70
|
+
"access": "public"
|
|
71
|
+
}
|
|
72
|
+
}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: 2d-pixel-perfect
|
|
3
|
+
description: Sets up, diagnoses, and fixes pixel perfect 2D rendering with PixelPerfectCamera in URP or Built-in. Use when a retro-style or pixel art 2D game looks blurry, jittery, or misaligned. Not for HD 2D or high-resolution art.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Set up, diagnose, and fix pixel perfect 2D rendering in Unity projects.
|
|
7
|
+
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
## ⚠ There Are Two Completely Separate Implementations
|
|
11
|
+
|
|
12
|
+
Pixel perfect rendering in Unity is **not one system** — it is two separate, incompatible implementations, one per render pipeline. **Always detect the pipeline before writing or diagnosing any code.**
|
|
13
|
+
|
|
14
|
+
| | URP | Built-in |
|
|
15
|
+
|---|---|---|
|
|
16
|
+
| **Component** | `UnityEngine.Rendering.Universal.PixelPerfectCamera` | `UnityEngine.U2D.PixelPerfectCamera` |
|
|
17
|
+
| **Package** | Built into URP — no extra install | `com.unity.2d.pixel-perfect` v6.0.0+ |
|
|
18
|
+
| **API style** | Enums (`gridSnapping`, `cropFrame`) | Booleans (`pixelSnapping`, `upscaleRT`, `cropFrameX/Y`) |
|
|
19
|
+
|
|
20
|
+
**Do not install `com.unity.2d.pixel-perfect` in a URP project.**
|
|
21
|
+
|
|
22
|
+
**→ Always call `DetectPipeline()` first** (`references/pipeline-detection.cs`), then branch your setup, diagnostics, and fixes based on the result.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## When NOT to use this skill
|
|
27
|
+
|
|
28
|
+
- **HD 2D or high-resolution 2D games** — pixel snapping and point filtering will make smooth art look wrong
|
|
29
|
+
- **UI-only scenes** — use Canvas Scaler instead
|
|
30
|
+
- **HDRP projects** — Pixel Perfect Camera is not supported
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Critical Reminders
|
|
35
|
+
|
|
36
|
+
⚠ **Detect the render pipeline first** — URP and Built-in use different Pixel Perfect Camera components that are not interchangeable.
|
|
37
|
+
⚠ **Filter Mode = Point is the #1 fix** — bilinear filtering is Unity's default and is almost always the cause of blurry sprites.
|
|
38
|
+
⚠ **Anti-Aliasing must be disabled** — in Quality Settings and on the camera. AA actively blurs pixel edges.
|
|
39
|
+
|
|
40
|
+
## Key Principles
|
|
41
|
+
|
|
42
|
+
### 1. Pipeline Detection & Camera Component Selection
|
|
43
|
+
|
|
44
|
+
See the two-path comparison table at the top of this file. Assembly name note: the standalone Built-in package installs into a `Runtime/` folder, but the asmdef `"name"` field is `Unity.2D.PixelPerfect` — no `Runtime` suffix. HDRP is unsupported — see the HDRP fallback section under Common Issues.
|
|
45
|
+
|
|
46
|
+
**→ Code: `references/pipeline-detection.cs`** — `DetectPipeline()`, `GetPixelPerfectCameraType()`, and migration mismatch check.
|
|
47
|
+
|
|
48
|
+
### 2. Diagnostic-First Approach
|
|
49
|
+
|
|
50
|
+
Always diagnose before making changes. Report findings, then fix only what is broken.
|
|
51
|
+
|
|
52
|
+
### 3. Work in the correct scope
|
|
53
|
+
|
|
54
|
+
Default to scene scope. Scan project-wide only when the user explicitly requests it.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Diagnostic Checklist
|
|
59
|
+
|
|
60
|
+
**Sprite import settings:**
|
|
61
|
+
- [ ] Filter Mode = `Point (no filter)` on all in-scope sprites
|
|
62
|
+
- [ ] Mip Maps = disabled
|
|
63
|
+
- [ ] Compression = `None` / Uncompressed
|
|
64
|
+
- [ ] PPU consistent across all sprites in scene
|
|
65
|
+
- [ ] Sprite pivots set to Custom / Pixels mode — a center pivot on an odd-dimension sprite (e.g. 15×15) lands at 7.5px, causing 0.5px misalignment
|
|
66
|
+
|
|
67
|
+
**→ Code: `references/sprite-settings.cs`** — `GetImporter()` and `FixSpriteImportSettings()`.
|
|
68
|
+
|
|
69
|
+
**Editor snap settings:**
|
|
70
|
+
- [ ] Grid Size = `1 / assetsPPU` on all axes (e.g. PPU 16 → 0.0625, PPU 100 → 0.01)
|
|
71
|
+
- [ ] Grid Snapping enabled in the Grid and Snap overlay
|
|
72
|
+
- [ ] To snap existing GameObjects: select them → Align Selected → All Axes
|
|
73
|
+
|
|
74
|
+
**Camera setup:**
|
|
75
|
+
- [ ] Camera projection = Orthographic
|
|
76
|
+
- [ ] Pixel Perfect Camera component present and correct type for pipeline
|
|
77
|
+
- [ ] `allowHDR`, `allowMSAA`, `allowDynamicResolution` all `false`
|
|
78
|
+
- [ ] Scene view shows two green bounding boxes on the camera gizmo — solid = visible area, dotted = reference resolution
|
|
79
|
+
|
|
80
|
+
**→ Code: `references/camera-setup-urp.cs`** — full URP camera + PP Camera configuration.
|
|
81
|
+
**→ Code: `references/camera-setup-builtin.cs`** — Built-in standalone configuration.
|
|
82
|
+
|
|
83
|
+
**Project quality settings:**
|
|
84
|
+
- [ ] Anti-Aliasing = 0 in Quality Settings
|
|
85
|
+
- [ ] Anisotropic Filtering = Disabled
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## API Reference
|
|
90
|
+
|
|
91
|
+
Full property/method tables, `GridSnapping` and `CropFrame` enum values, and recommended configurations:
|
|
92
|
+
**→ `references/api-reference.md`** — read this when writing or reviewing camera setup code.
|
|
93
|
+
|
|
94
|
+
Quick enum summary:
|
|
95
|
+
|
|
96
|
+
**`GridSnapping`**: `None` · `PixelSnapping` (standard) · `UpscaleRenderTexture` (authentic low-res; incompatible with post-processing and UI text)
|
|
97
|
+
|
|
98
|
+
**`CropFrame`**: `None` · `Pillarbox` · `Letterbox` · `Windowbox` (safest default) · `StretchFill`
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Reference Resolution
|
|
103
|
+
|
|
104
|
+
Choose before building any assets. Never change after asset production starts.
|
|
105
|
+
|
|
106
|
+
| Reference resolution | 1080p | 1440p | 4K |
|
|
107
|
+
|---|---|---|---|
|
|
108
|
+
| 320 × 180 | 6× | 8× | 12× |
|
|
109
|
+
| 480 × 270 | 4× | ~5.3× | 8× |
|
|
110
|
+
| 640 × 360 | 3× | 4× | 6× |
|
|
111
|
+
|
|
112
|
+
320×180 is the safest general choice. For screens with no integer fit (e.g. 1366×768), use `cropFrame = Windowbox` to add black bars rather than stretching to a fractional scale.
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Migration & Compatibility
|
|
117
|
+
|
|
118
|
+
### URP project with the Built-in standalone component
|
|
119
|
+
|
|
120
|
+
**Symptom**: `DetectPipeline()` returns URP but camera has `UnityEngine.U2D.PixelPerfectCamera`. Symptoms are subtle because the standalone component has `ENABLE_URP` conditional code.
|
|
121
|
+
|
|
122
|
+
**Fix**:
|
|
123
|
+
1. Remove `com.unity.2d.pixel-perfect` from Package Manager
|
|
124
|
+
2. Remove `UnityEngine.U2D.PixelPerfectCamera` from each camera
|
|
125
|
+
3. Add `UnityEngine.Rendering.Universal.PixelPerfectCamera`
|
|
126
|
+
4. Reconfigure — booleans (`pixelSnapping`, `upscaleRT`, `cropFrameX/Y`) become enums (`gridSnapping`, `cropFrame`)
|
|
127
|
+
|
|
128
|
+
**→ Detection code: `references/pipeline-detection.cs`** (bottom of file).
|
|
129
|
+
|
|
130
|
+
### Old URP namespace (pre-Unity 2022 / URP pre-13.x)
|
|
131
|
+
|
|
132
|
+
**Symptom**: Compiler errors referencing `UnityEngine.Experimental.Rendering.Universal`.
|
|
133
|
+
|
|
134
|
+
**Fix**: Replace `using UnityEngine.Experimental.Rendering.Universal;` with `using UnityEngine.Rendering.Universal;`. Update any assembly-qualified type strings. The `[MovedFrom]` attribute handles serialization automatically — components on GameObjects survive the upgrade.
|
|
135
|
+
|
|
136
|
+
---
|
|
137
|
+
|
|
138
|
+
## Common Issues & Solutions
|
|
139
|
+
|
|
140
|
+
### Blurry sprites
|
|
141
|
+
**Fix**: Set Filter Mode to Point on all in-scope sprites, disable Mip Maps, disable AA in Quality Settings.
|
|
142
|
+
**→ Code: `references/sprite-settings.cs`**
|
|
143
|
+
|
|
144
|
+
### Tilemap gaps between tiles
|
|
145
|
+
Work through in order — workarounds like negative cell gap or PPU = 31.99 break when the camera moves.
|
|
146
|
+
|
|
147
|
+
| # | Check | Fix |
|
|
148
|
+
|---|---|---|
|
|
149
|
+
| 1 | Sprite Atlas with Tight Packing off, Padding ≥ 4, Sprite Packer Mode enabled? | Enable Sprite Packer Mode in Editor settings; on the atlas set Padding ≥ 4 and turn Tight Packing off |
|
|
150
|
+
| 2 | Mipmaps disabled on tileset textures and atlas? | Disable Generate Mip Maps |
|
|
151
|
+
| 3 | AA = 0, MSAA off on camera? | Disable AA globally |
|
|
152
|
+
| 4 | Compression = None? | RGBA 32-bit uncompressed |
|
|
153
|
+
| 5 | All tile sprites have even pixel dimensions? | Odd dimensions cause 0.5px grid offset |
|
|
154
|
+
| 6 | PPU = tile pixel width? (16×16 → PPU 16) | PPU mismatch leaves physical gaps |
|
|
155
|
+
| 7 | Gaps only during camera movement after all above pass? | Use PP Camera pixel snapping; do not use `cellGap = -0.01f` |
|
|
156
|
+
|
|
157
|
+
### Cinemachine conflict
|
|
158
|
+
**Cause**: Both Cinemachine and the Pixel Perfect Camera write to orthographic size every frame.
|
|
159
|
+
|
|
160
|
+
**Fix**: Add `CinemachinePixelPerfect` extension via the Add Extension dropdown on each Virtual Camera. Do not add it via `AddComponent` in code.
|
|
161
|
+
|
|
162
|
+
**Known limitations**:
|
|
163
|
+
- Camera blends between virtual cameras are not pixel-perfect during transitions
|
|
164
|
+
- `UpscaleRenderTexture` reduces valid pixel-perfect ortho sizes, which may cause framing to deviate
|
|
165
|
+
- Target Group + Framing Transposer causes visible choppiness (no fix available)
|
|
166
|
+
|
|
167
|
+
### Post-processing blur with `upscaleRT`
|
|
168
|
+
**Cause**: Post-processing runs after the PP Camera upscales the render texture.
|
|
169
|
+
|
|
170
|
+
**Simple fix**: Disable `upscaleRT`. Post-processing then runs at native screen resolution.
|
|
171
|
+
|
|
172
|
+
**Advanced fix (Unity 6 URP)**: Inject a `ScriptableRendererFeature2D` at `RenderPassEvent2D.AfterRenderingPostProcessing`. Use 2D-specific base classes — `ScriptableRendererFeature` (3D base class) is silently ignored in a URP 2D renderer.
|
|
173
|
+
|
|
174
|
+
### UI text blurry with `upscaleRT`
|
|
175
|
+
**Status**: Known Unity bug, declined to fix (still present Unity 6, 2025).
|
|
176
|
+
|
|
177
|
+
**Root causes**: (A) Canvas renders into the low-res buffer and is upscaled with the scene. (B) TMP's SDF gradient threshold is miscalibrated at low reference resolutions.
|
|
178
|
+
|
|
179
|
+
**Fixes in order of reliability**:
|
|
180
|
+
1. `Screen Space - Overlay` on Canvas — bypasses the camera, renders at native resolution
|
|
181
|
+
2. Dedicated UI camera with no PP Camera component, `Screen Space - Camera` mode
|
|
182
|
+
3. Unity 6 only: `Font Material → Debug Settings → Sharpness = 1` (mitigates B, not A)
|
|
183
|
+
|
|
184
|
+
### Physics / render desync (micro-stutter)
|
|
185
|
+
**Cause**: Physics runs at a fixed timestep; interpolated positions produce fractional values that snap to different pixels each frame.
|
|
186
|
+
|
|
187
|
+
**Fix**:
|
|
188
|
+
- Enable `Rigidbody2D.interpolation = RigidbodyInterpolation2D.Interpolate` on physics-driven sprites
|
|
189
|
+
- Set `Time.fixedDeltaTime = 1f / 60f` to match target frame rate
|
|
190
|
+
- Keep camera tracking in `LateUpdate`, not `FixedUpdate`
|
|
191
|
+
|
|
192
|
+
### Non-integer scaling / pixel decimation
|
|
193
|
+
**Cause**: Screen resolution is not a clean integer multiple of the reference resolution.
|
|
194
|
+
|
|
195
|
+
**Fix**: Choose a reference resolution from the table above. Use `cropFrame = Windowbox` when no integer fit exists.
|
|
196
|
+
|
|
197
|
+
### Missing URP 2D Renderer
|
|
198
|
+
**Fix**:
|
|
199
|
+
1. `Assets > Create > Rendering > URP 2D Renderer Data`
|
|
200
|
+
2. Assign it to your URP Asset under Renderer List
|
|
201
|
+
3. Requires `com.unity.render-pipelines.universal` 12.0+
|
|
202
|
+
|
|
203
|
+
### HDRP fallback
|
|
204
|
+
Pixel Perfect Camera is unsupported in HDRP.
|
|
205
|
+
|
|
206
|
+
**Built-in / Unity 5.x**: Use `RenderTexture` + `Graphics.Blit` with `FilterMode.Point`.
|
|
207
|
+
|
|
208
|
+
**Unity 6 URP**: Use `ScriptableRendererFeature2D` + `ScriptableRenderPass2D` injected at `RenderPassEvent2D.AfterRendering` with `AddRasterRenderPass`. Note: `OnRenderImage` and `Graphics.Blit` are incompatible with Unity 6's render graph.
|