@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,39 @@
|
|
|
1
|
+
void GenerateVariantAtlas(string masterPath, string variantPath, float scale)
|
|
2
|
+
{
|
|
3
|
+
// Load master atlas (must exist and be imported first)
|
|
4
|
+
SpriteAtlas masterRuntime = AssetDatabase.LoadAssetAtPath<SpriteAtlas>(masterPath);
|
|
5
|
+
if (masterRuntime == null)
|
|
6
|
+
{
|
|
7
|
+
Debug.LogError($"Master atlas not found: {masterPath}");
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
// Get original packables from master
|
|
12
|
+
Object[] originalPackables = masterRuntime.GetPackables();
|
|
13
|
+
|
|
14
|
+
// Create variant
|
|
15
|
+
SpriteAtlasAsset variantAsset = new SpriteAtlasAsset();
|
|
16
|
+
variantAsset.SetIsVariant(true);
|
|
17
|
+
variantAsset.Add(originalPackables);
|
|
18
|
+
variantAsset.SetMasterAtlas(masterRuntime);
|
|
19
|
+
|
|
20
|
+
SpriteAtlasAsset.Save(variantAsset, variantPath);
|
|
21
|
+
AssetDatabase.ImportAsset(variantPath);
|
|
22
|
+
|
|
23
|
+
// Configure variant scale
|
|
24
|
+
SpriteAtlasImporter importer = AssetImporter.GetAtPath(variantPath) as SpriteAtlasImporter;
|
|
25
|
+
if (importer != null)
|
|
26
|
+
{
|
|
27
|
+
importer.variantScale = scale;
|
|
28
|
+
importer.includeInBuild = true;
|
|
29
|
+
importer.SaveAndReimport();
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Usage in OnPreprocessBuild:
|
|
34
|
+
GenerateAtlasByFolder("Assets/Art/UI", "Assets/Atlases/UI_Master.spriteatlasv2");
|
|
35
|
+
GenerateVariantAtlas(
|
|
36
|
+
"Assets/Atlases/UI_Master.spriteatlasv2",
|
|
37
|
+
"Assets/Atlases/UI_HD.spriteatlasv2",
|
|
38
|
+
0.5f // HD variant at 50% scale
|
|
39
|
+
);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Security notes: migrate-birp-to-urp
|
|
2
|
+
|
|
3
|
+
This skill has the agent run C# inside the user's open Unity Editor through `unity command script eval`. Automated skill scanners flag that as a powerful capability. It is intentional, and it is limited by the safeguards below.
|
|
4
|
+
|
|
5
|
+
## Accepted risks
|
|
6
|
+
|
|
7
|
+
| Risk | Capability | Why it is accepted |
|
|
8
|
+
|---|---|---|
|
|
9
|
+
| `SEC_POWER_CAP` | Runs C# in the user's open Editor through `unity command script eval` | It only reaches the Editor the user already has open, on their own machine, as that user, so it grants nothing they couldn't do themselves. `script eval` sits behind the Pipeline capability gate. No code fetched from a remote source is run. Where a named `unity command` covers a step, the skill uses that instead of `script eval`. |
|
|
10
|
+
|
|
11
|
+
## Mitigations
|
|
12
|
+
|
|
13
|
+
- **Only the user's own Editor.** `unity command script eval` talks to the Editor open on this machine. It can't reach another machine or another user's Editor.
|
|
14
|
+
- **Capability gate.** `script eval` is only available when the project's Pipeline package provides it.
|
|
15
|
+
- **No remote code.** The agent runs C# it writes from this skill's own recipes. Nothing downloaded from outside is executed.
|
|
16
|
+
- **Named commands first.** When a dedicated `unity command` covers a step, the skill uses it instead of `script eval`.
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: migrate-birp-to-urp
|
|
3
|
+
description: Plans, executes, and troubleshoots migration from the Built-in Render Pipeline to URP. Use when asked to convert a project, scene, material, or shader to URP, or to fix visuals broken by the change.
|
|
4
|
+
---
|
|
5
|
+
Classify the request, inspect the current project state, choose the correct migration path, and validate the Built-in to URP migration outcome carefully.
|
|
6
|
+
|
|
7
|
+
## Mandatory Execution Reference
|
|
8
|
+
|
|
9
|
+
For any actual migration or repair pass, read [references/implementation-patterns.md](references/implementation-patterns.md) before the first `script eval` call that edits project settings, materials, post-processing, lighting, probes, or scenes. This is mandatory even for short prompts such as "migrate this project to URP" when rollback safety is already confirmed.
|
|
10
|
+
|
|
11
|
+
If that resource cannot be loaded, use the embedded rules in this SKILL.md and lower your confidence: do not claim PPv2 conversion, lighting/probe refresh, or migration completion from intent or tool logs alone.
|
|
12
|
+
|
|
13
|
+
## Critical Default
|
|
14
|
+
|
|
15
|
+
For a generic "migrate this project to URP" request, run phases 0-4: inspect and plan, URP setup and material conversion, post-processing and cameras, lighting and probes, validation and report. Read [Critical Default](references/preflight-and-urp-setup.md#critical-default) before starting and before any success claim: it holds the upgrade contract and the success gate.
|
|
16
|
+
|
|
17
|
+
## Execution path: running C# in the Editor
|
|
18
|
+
|
|
19
|
+
Every C# step in this skill runs inside a live Editor through the Unity CLI. **The `unity-cli`
|
|
20
|
+
skill owns getting you there** — installing the CLI, confirming a connected Editor, adding the
|
|
21
|
+
project's `com.unity.pipeline` package, telling a genuinely absent Editor apart from one stuck in
|
|
22
|
+
Safe Mode, and discovering the Editor's command catalog. Follow it first; don't re-derive any of
|
|
23
|
+
it here.
|
|
24
|
+
|
|
25
|
+
Two things it can't know for you:
|
|
26
|
+
|
|
27
|
+
- **You need `script eval` in particular**, not just a reachable Editor. Confirm it appears in the
|
|
28
|
+
catalog. Its presence depends on the Pipeline package version, not on the CLI, so a healthy
|
|
29
|
+
install can still lack it — if it's missing, say so and stop.
|
|
30
|
+
- **On an Editor older than 6000.3, expect the Pipeline package not to work at all**, and read the
|
|
31
|
+
symptom correctly rather than retrying. `com.unity.pipeline` uses `IPreprocessBuildWithContext`
|
|
32
|
+
and `BuildCallbackContext`, which Unity introduced in **6000.3**; the package's own manifest
|
|
33
|
+
declares `"unity": "6000.0"`, so it installs happily and then fails to compile. Measured:
|
|
34
|
+
present in 6000.3 / 6000.4 / 6000.5, absent in 6000.0 / 6000.1 / 6000.2 and in the 2022 and 2023
|
|
35
|
+
lines. The symptom is misleading — the server never starts, `unity status` shows no row and no
|
|
36
|
+
error, and the real cause is `CS0246` on those two types in the Editor log. If you see that,
|
|
37
|
+
tell the user the Editor is too old for the Pipeline package rather than debugging the CLI.
|
|
38
|
+
|
|
39
|
+
**This matters here more than in most skills:** someone migrating a project off the Built-in
|
|
40
|
+
pipeline is, by definition, often on an older Editor.
|
|
41
|
+
- **A render-pipeline migration is not safely authorable blind.** Assigning a URP asset, converting
|
|
42
|
+
materials, and rebaking lighting all need a live Editor. An unreachable Editor is a stop, not a
|
|
43
|
+
cue to hand-edit `ProjectSettings/GraphicsSettings.asset`.
|
|
44
|
+
|
|
45
|
+
Run C# with `unity command script eval --caller plugin --skill migrate-birp-to-urp --code '<snippet>'`. `unity command` defaults to a 30 second
|
|
46
|
+
timeout, which matters here: installing URP triggers a package refresh and domain reload that will
|
|
47
|
+
outlast it. Treat that as a phase boundary rather than raising the timeout.
|
|
48
|
+
|
|
49
|
+
### Passing C# to `script eval`
|
|
50
|
+
|
|
51
|
+
`script eval` compiles a **statement block, not a file**. Three consequences, all of which cause a compile
|
|
52
|
+
error rather than a warning:
|
|
53
|
+
|
|
54
|
+
- **No `using` directives.** The compiler reads `using UnityEngine;` as a resource-disposal
|
|
55
|
+
statement and rejects it (`CS0210`).
|
|
56
|
+
- **Types must be fully qualified.** A bare `GraphicsSettings` or `Volume` does not resolve
|
|
57
|
+
(`CS0246` / `CS0103`), and a bare `Object` is ambiguous with `object` (`CS0104`).
|
|
58
|
+
- **Extension methods are unavailable**, because they resolve through `using`. Two that this skill
|
|
59
|
+
would otherwise reach for: `camera.GetUniversalAdditionalCameraData()` becomes
|
|
60
|
+
`camera.GetComponent<UnityEngine.Rendering.Universal.UniversalAdditionalCameraData>()`, and LINQ
|
|
61
|
+
calls must be written statically — `System.Linq.Enumerable.FirstOrDefault(sequence, predicate)`
|
|
62
|
+
rather than `sequence.FirstOrDefault(predicate)`.
|
|
63
|
+
|
|
64
|
+
### Two execution modes — pick by the snippet's shape
|
|
65
|
+
|
|
66
|
+
The references carry both shapes, and they are not interchangeable:
|
|
67
|
+
|
|
68
|
+
- **Statement-shaped** (a bare sequence of statements, like the detection snippets above) — pass
|
|
69
|
+
straight to `script eval`, fully qualified, with no `using` lines.
|
|
70
|
+
- **Class- or method-shaped** (anything declaring a `class`, a `static` method, or a `[MenuItem]`,
|
|
71
|
+
such as the material-snapshot pattern) — these are **project files, not `script eval` input**. A class
|
|
72
|
+
declaration cannot be flattened into a statement block. Save the snippet under
|
|
73
|
+
`Assets/Editor/`, let Unity compile it, then invoke its entry point through a one-line `script eval`
|
|
74
|
+
call. Keep the `using` directives in that file; they are correct there.
|
|
75
|
+
|
|
76
|
+
For a multi-step migration the script route is the more reliable one anyway: it survives the domain
|
|
77
|
+
reloads that URP installation and material conversion trigger, whereas a long `script eval` payload does
|
|
78
|
+
not.
|
|
79
|
+
|
|
80
|
+
### Detecting the active render pipeline
|
|
81
|
+
|
|
82
|
+
Read [pipeline detection](references/preflight-and-urp-setup.md#detecting-the-active-render-pipeline) for the snippets that tell Built-in, URP, and HDRP apart.
|
|
83
|
+
|
|
84
|
+
## 0. Pre-Flight: Pipeline Detection and Reference Loading
|
|
85
|
+
|
|
86
|
+
Read [0. Pre-Flight](references/preflight-and-urp-setup.md#0-pre-flight-pipeline-detection-and-reference-loading) first; it fixes the migration mode and the reference set.
|
|
87
|
+
|
|
88
|
+
## 1. Assess Current Migration State
|
|
89
|
+
|
|
90
|
+
Read [assess current state](references/preflight-and-urp-setup.md#1-assess-current-migration-state) to inventory materials, shaders, scenes, volumes, lighting, and probes.
|
|
91
|
+
|
|
92
|
+
## 2. Gather Requirements
|
|
93
|
+
|
|
94
|
+
Read [gather requirements](references/preflight-and-urp-setup.md#2-gather-requirements) when the request is ambiguous.
|
|
95
|
+
|
|
96
|
+
## 3. Safety Gate
|
|
97
|
+
|
|
98
|
+
Read [safety gate](references/preflight-and-urp-setup.md#3-safety-gate) before any rollback-sensitive step.
|
|
99
|
+
|
|
100
|
+
## 4. Choose the Migration Path
|
|
101
|
+
|
|
102
|
+
Read [migration paths](references/conversion-and-rendering-triage.md#4-choose-the-migration-path) before choosing a workflow.
|
|
103
|
+
|
|
104
|
+
## 5. URP Setup Workflow
|
|
105
|
+
|
|
106
|
+
Read [URP setup](references/preflight-and-urp-setup.md#5-urp-setup-workflow) when installing or assigning URP, or after a package-refresh boundary.
|
|
107
|
+
|
|
108
|
+
## 6. Conversion Workflow
|
|
109
|
+
|
|
110
|
+
Read [conversion workflow](references/conversion-and-rendering-triage.md#6-conversion-workflow) when running Render Pipeline Converter and checking its saved results.
|
|
111
|
+
|
|
112
|
+
## 7. Shader and Material Triage
|
|
113
|
+
|
|
114
|
+
Read [shader triage](references/conversion-and-rendering-triage.md#7-shader-and-material-triage) when materials are magenta or shaders fail to compile.
|
|
115
|
+
|
|
116
|
+
## 8. Post-Processing, Cameras, and Rendering-Effect Triage
|
|
117
|
+
|
|
118
|
+
Read [rendering-effect triage](references/conversion-and-rendering-triage.md#8-post-processing-cameras-and-rendering-effect-triage) when PPv2, camera effects, or replacement shaders are in scope.
|
|
119
|
+
|
|
120
|
+
## 9. Quality, Lighting, and Visual Parity Review
|
|
121
|
+
|
|
122
|
+
Read [parity review](references/parity-validation-and-troubleshooting.md#9-quality-lighting-and-visual-parity-review) when the scene looks wrong after migration.
|
|
123
|
+
|
|
124
|
+
## 10. Validation
|
|
125
|
+
|
|
126
|
+
Read [validation](references/parity-validation-and-troubleshooting.md#10-validation) before reporting results.
|
|
127
|
+
|
|
128
|
+
## 11. Troubleshooting Decision Tree
|
|
129
|
+
|
|
130
|
+
Read [troubleshooting tree](references/parity-validation-and-troubleshooting.md#11-troubleshooting-decision-tree) when the user reports a migration symptom.
|
|
131
|
+
|
|
132
|
+
## 12. Core Guardrails
|
|
133
|
+
|
|
134
|
+
- Detect the active render pipeline first; for HDRP, explain the mismatch and offer only basic comparison guidance.
|
|
135
|
+
- Do not mutate the project before rollback safety is confirmed; instead stop in planning mode before URP install, asset assignment, converters, material edits, or scene edits.
|
|
136
|
+
- Do not treat tool logs or created assets as proof; instead save/reload/re-query Graphics, Quality, materials, Volumes, lighting, probes, Console, and representative scenes before status claims.
|
|
137
|
+
- Do not collapse partial phases into project-level completion; instead report `Phase complete`, `Partial migration`, and `Manual follow-up` based on the success gate.
|
|
138
|
+
- Do not bulk-rewrite fragile rendering code; instead use scoped mappings for custom shaders, `GrabPass`, `OnRenderImage`, replacement shaders, package-owned render code, and unsupported PPv2 effects.
|
|
139
|
+
|
|
140
|
+
## 13. Reporting Back
|
|
141
|
+
|
|
142
|
+
Summarize:
|
|
143
|
+
|
|
144
|
+
- which migration path was used
|
|
145
|
+
- whether the project is still Built-in, partially migrated, or fully on URP
|
|
146
|
+
- which converters ran
|
|
147
|
+
- what was fixed automatically
|
|
148
|
+
- what still needs manual work
|
|
149
|
+
- which scenes, materials, or cameras were validated
|
|
150
|
+
- what remains risky, especially around complex shaders, package effects, and visual parity
|
|
151
|
+
- whether post-processing was fully migrated, partially prepared, or only documented for manual follow-up
|
|
152
|
+
- whether Quality levels are explicitly assigned or intentionally relying on Graphics settings fallback
|
|
153
|
+
- whether particle/VFX materials were converted or still need URP particle-shader follow-up
|
|
154
|
+
- whether baked lighting/lightmaps/reflection probes were preserved as reference, verified visually, rebaked/refreshed, or left as manual follow-up
|
|
155
|
+
- whether exposure, tonemapping, ambient fill, and camera/Volume post-processing wiring were visually balanced or still remain partial
|
|
156
|
+
|
|
157
|
+
Use completion language conservatively. If the report contains any `Partial`, `Manual follow-up`, `not validated`, `may still need`, or unsupported-feature item, state that specific completed phases passed and call the overall migration partial/manual. Do not pair a project-level "complete" claim with manual follow-up bullets.
|
|
158
|
+
|
|
159
|
+
## References
|
|
160
|
+
|
|
161
|
+
- [Migration Workflow](references/migration-workflow.md)
|
|
162
|
+
- [Custom Shader Triage](references/custom-shader-triage.md)
|
|
163
|
+
- [Complex Shader Situations](references/complex-shader-situations.md)
|
|
164
|
+
- [Quality Settings Map](references/quality-settings-map.md)
|
|
165
|
+
- [Implementation Patterns](references/implementation-patterns.md)
|
|
166
|
+
|
|
167
|
+
When this skill is activated, proactively read [references/migration-workflow.md](references/migration-workflow.md). If the request involves materials, shaders, magenta materials, custom rendering, or fullscreen effects, also read [references/custom-shader-triage.md](references/custom-shader-triage.md) and [references/complex-shader-situations.md](references/complex-shader-situations.md). If the request involves visual mismatch, lighting, baked lighting, lightmaps, reflection probes, shadows, or performance after migration, also read [references/quality-settings-map.md](references/quality-settings-map.md). If the user permits actual migration changes or asks to continue/repair a partial migration, also read [references/implementation-patterns.md](references/implementation-patterns.md).
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Capturing the Editor for visual checks
|
|
2
|
+
|
|
3
|
+
There is no capture command in the Pipeline catalog. Run the capture as C# through `script eval`, write
|
|
4
|
+
a PNG, then **read that file** — reading an image is something the agent does natively, so the
|
|
5
|
+
two-step version is equivalent to a single capture tool.
|
|
6
|
+
|
|
7
|
+
Both variants below were verified against a live Unity 6 Editor.
|
|
8
|
+
|
|
9
|
+
## Scene View
|
|
10
|
+
|
|
11
|
+
```csharp
|
|
12
|
+
var sv = UnityEditor.SceneView.lastActiveSceneView;
|
|
13
|
+
if (sv == null) throw new System.Exception("No active SceneView to capture.");
|
|
14
|
+
var cam = sv.camera;
|
|
15
|
+
var rt = new UnityEngine.RenderTexture(1280, 720, 24);
|
|
16
|
+
var prevTarget = cam.targetTexture; cam.targetTexture = rt; cam.Render(); cam.targetTexture = prevTarget;
|
|
17
|
+
var prevActive = UnityEngine.RenderTexture.active; UnityEngine.RenderTexture.active = rt;
|
|
18
|
+
var tex = new UnityEngine.Texture2D(1280, 720, UnityEngine.TextureFormat.RGB24, false);
|
|
19
|
+
tex.ReadPixels(new UnityEngine.Rect(0, 0, 1280, 720), 0, 0); tex.Apply();
|
|
20
|
+
UnityEngine.RenderTexture.active = prevActive;
|
|
21
|
+
var path = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "unity-sceneview.png");
|
|
22
|
+
System.IO.File.WriteAllBytes(path, UnityEngine.ImageConversion.EncodeToPNG(tex));
|
|
23
|
+
return path;
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Game camera
|
|
27
|
+
|
|
28
|
+
Same shape, rendering `Camera.main` instead:
|
|
29
|
+
|
|
30
|
+
```csharp
|
|
31
|
+
var cam = UnityEngine.Camera.main;
|
|
32
|
+
if (cam == null) throw new System.Exception("No Camera.main in the active scene.");
|
|
33
|
+
var rt = new UnityEngine.RenderTexture(1280, 720, 24);
|
|
34
|
+
var prevTarget = cam.targetTexture; cam.targetTexture = rt; cam.Render(); cam.targetTexture = prevTarget;
|
|
35
|
+
var prevActive = UnityEngine.RenderTexture.active; UnityEngine.RenderTexture.active = rt;
|
|
36
|
+
var tex = new UnityEngine.Texture2D(1280, 720, UnityEngine.TextureFormat.RGB24, false);
|
|
37
|
+
tex.ReadPixels(new UnityEngine.Rect(0, 0, 1280, 720), 0, 0); tex.Apply();
|
|
38
|
+
UnityEngine.RenderTexture.active = prevActive;
|
|
39
|
+
var path = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "unity-gameview.png");
|
|
40
|
+
System.IO.File.WriteAllBytes(path, UnityEngine.ImageConversion.EncodeToPNG(tex));
|
|
41
|
+
return path;
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Several angles
|
|
45
|
+
|
|
46
|
+
Move the Scene View camera between captures and write a distinct filename each time. `sv.pivot`
|
|
47
|
+
sets what it looks at, `sv.rotation` the direction, `sv.size` the distance; call `sv.Repaint()`
|
|
48
|
+
after changing them, then capture as above.
|
|
49
|
+
|
|
50
|
+
```csharp
|
|
51
|
+
var sv = UnityEditor.SceneView.lastActiveSceneView;
|
|
52
|
+
sv.pivot = new UnityEngine.Vector3(0, 0, 0);
|
|
53
|
+
sv.rotation = UnityEngine.Quaternion.Euler(30, 45, 0); // vary this per angle
|
|
54
|
+
sv.size = 10f;
|
|
55
|
+
sv.Repaint();
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
To frame specific objects rather than a fixed point, select them and use
|
|
59
|
+
`UnityEditor.SceneView.FrameLastActiveSceneView()`, or set `sv.pivot` to the centre of their
|
|
60
|
+
combined bounds.
|
|
61
|
+
|
|
62
|
+
**Then read the returned path.** Write each capture to a distinct filename so a later capture
|
|
63
|
+
doesn't get confused with an earlier one — comparing before and after a change is the whole point.
|
|
64
|
+
|
|
65
|
+
Temp files are the default here rather than `Assets/`: a PNG written into the project becomes an
|
|
66
|
+
imported asset the user then has to clean up.
|
|
@@ -0,0 +1,272 @@
|
|
|
1
|
+
# Complex Shader Situations
|
|
2
|
+
|
|
3
|
+
Use deliberate URP migration strategies for higher-risk Built-in rendering patterns instead of quick shader rewrites.
|
|
4
|
+
|
|
5
|
+
## Table of Contents
|
|
6
|
+
|
|
7
|
+
- [Official References](#official-references)
|
|
8
|
+
- [Ground Truth](#ground-truth)
|
|
9
|
+
- [Case 1: Surface Shaders](#case-1-surface-shaders)
|
|
10
|
+
- [Case 2: GrabPass, Refraction, and Scene-Color Effects](#case-2-grabpass-refraction-and-scene-color-effects)
|
|
11
|
+
- [Case 3: Built-in Fullscreen Effects and `OnRenderImage`](#case-3-built-in-fullscreen-effects-and-onrenderimage)
|
|
12
|
+
- [Case 4: Replacement Shader and Alternate-Camera Rendering Workflows](#case-4-replacement-shader-and-alternate-camera-rendering-workflows)
|
|
13
|
+
- [Case 5: Multi-Pass, Custom Lighting, and Deferred-Specific Shaders](#case-5-multi-pass-custom-lighting-and-deferred-specific-shaders)
|
|
14
|
+
- [Case 6: Package-Owned and Framework Shaders](#case-6-package-owned-and-framework-shaders)
|
|
15
|
+
- [Stop-and-Escalate Signals](#stop-and-escalate-signals)
|
|
16
|
+
|
|
17
|
+
## Official References
|
|
18
|
+
|
|
19
|
+
- [Render pipeline feature comparison](https://docs.unity3d.com/Manual/render-pipelines-feature-comparison.html)
|
|
20
|
+
- [Upgrade custom shaders for URP compatibility](https://docs.unity3d.com/Manual/urp/urp-shaders/birp-urp-custom-shader-upgrade-guide.html)
|
|
21
|
+
- [Camera.OnRenderImage](https://docs.unity3d.com/ScriptReference/Camera.OnRenderImage.html)
|
|
22
|
+
- [Custom post-processing in URP](https://docs.unity3d.com/Manual/urp/post-processing/custom-post-processing.html)
|
|
23
|
+
- [Make a shader compatible with the Deferred rendering path in URP](https://docs.unity3d.com/Manual/urp/rendering/make-shader-compatible-with-deferred.html)
|
|
24
|
+
|
|
25
|
+
## Ground Truth
|
|
26
|
+
|
|
27
|
+
- The Render Pipeline Converter does not auto-upgrade custom shaders.
|
|
28
|
+
- URP does not support `GrabPass`.
|
|
29
|
+
- URP does not support Surface Shaders.
|
|
30
|
+
- `OnRenderImage` is a Built-in image-effect path; URP custom fullscreen effects should move toward `ScriptableRenderPass`, Renderer Features, or URP custom post-processing.
|
|
31
|
+
- Hand-written shaders can work in URP, but Shader Graph is often the safer option for simpler effects.
|
|
32
|
+
|
|
33
|
+
## Case 1: Surface Shaders
|
|
34
|
+
|
|
35
|
+
Indicators:
|
|
36
|
+
|
|
37
|
+
- `#pragma surface`
|
|
38
|
+
- Surface-shader lighting models
|
|
39
|
+
- heavy reliance on Built-in lighting helpers
|
|
40
|
+
|
|
41
|
+
Implication:
|
|
42
|
+
|
|
43
|
+
- Surface shaders do not carry over directly to URP.
|
|
44
|
+
|
|
45
|
+
Safer migration path:
|
|
46
|
+
|
|
47
|
+
1. Do not attempt a blind syntax patch.
|
|
48
|
+
2. Decide whether the shader should be:
|
|
49
|
+
- rebuilt in Shader Graph
|
|
50
|
+
- rewritten as a URP HLSL shader
|
|
51
|
+
- replaced with an existing URP shader if the effect is not special
|
|
52
|
+
3. Port and validate one representative shader before scaling.
|
|
53
|
+
|
|
54
|
+
## Case 2: GrabPass, Refraction, and Scene-Color Effects
|
|
55
|
+
|
|
56
|
+
Indicators:
|
|
57
|
+
|
|
58
|
+
- `GrabPass`
|
|
59
|
+
- screen-copy distortion or refraction effects
|
|
60
|
+
- shaders that expect to sample the already-rendered scene the Built-in way
|
|
61
|
+
|
|
62
|
+
Implication:
|
|
63
|
+
|
|
64
|
+
- URP does not support `GrabPass`.
|
|
65
|
+
|
|
66
|
+
Safer migration path:
|
|
67
|
+
|
|
68
|
+
1. Determine whether the effect really needs scene color.
|
|
69
|
+
2. Enable **Opaque Texture** in the URP Asset if the effect needs to sample already-rendered opaque color.
|
|
70
|
+
3. For simple material-level effects, consider a Shader Graph Scene Color path when appropriate.
|
|
71
|
+
4. For hand-written HLSL, prefer URP's opaque texture include instead of a raw `GrabPass` replacement:
|
|
72
|
+
|
|
73
|
+
```hlsl
|
|
74
|
+
#include "Packages/com.unity.render-pipelines.universal/ShaderLibrary/DeclareOpaqueTexture.hlsl"
|
|
75
|
+
|
|
76
|
+
float2 screenUV = input.positionCS.xy / _ScaledScreenParams.xy;
|
|
77
|
+
half3 sceneColor = SampleSceneColor(screenUV);
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
5. For broader effect pipelines, plan a Renderer Feature or custom pass approach.
|
|
81
|
+
6. Call out that Built-in `GrabPass` and URP opaque texture are not perfectly equivalent. Transparent sorting, when the texture is captured, and camera stacking can affect parity.
|
|
82
|
+
7. Do not claim direct parity until the effect is revalidated in-scene.
|
|
83
|
+
|
|
84
|
+
## Case 3: Built-in Fullscreen Effects and `OnRenderImage`
|
|
85
|
+
|
|
86
|
+
Indicators:
|
|
87
|
+
|
|
88
|
+
- `OnRenderImage(RenderTexture, RenderTexture)`
|
|
89
|
+
- custom image-effect scripts
|
|
90
|
+
- blit-style camera callbacks
|
|
91
|
+
|
|
92
|
+
Implication:
|
|
93
|
+
|
|
94
|
+
- In URP, these effects should move toward `ScriptableRenderPass`, Renderer Features, or URP custom post-processing.
|
|
95
|
+
|
|
96
|
+
Safer migration path:
|
|
97
|
+
|
|
98
|
+
1. Identify what the effect actually needs: full-screen color, depth, normals, or custom buffers.
|
|
99
|
+
2. Choose a URP-compatible implementation path.
|
|
100
|
+
3. For a normal fullscreen blit in Unity 6 / recent URP, propose a `ScriptableRendererFeature` with a `ScriptableRenderPass`, `RTHandle`, and `Blitter` rather than preserving `OnRenderImage`.
|
|
101
|
+
4. Port one effect at a time.
|
|
102
|
+
5. Validate in Game View, not only in Scene View.
|
|
103
|
+
|
|
104
|
+
Avoid this common mistake:
|
|
105
|
+
|
|
106
|
+
```csharp
|
|
107
|
+
Blitter.BlitCameraTexture(cmd, source, source, material, 0);
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
Do not present source-to-source blits as the recommended replacement for `OnRenderImage`. Use a temporary target, then blit back to the camera color target.
|
|
111
|
+
|
|
112
|
+
Minimal shape for an answer:
|
|
113
|
+
|
|
114
|
+
```csharp
|
|
115
|
+
using UnityEngine;
|
|
116
|
+
using UnityEngine.Rendering;
|
|
117
|
+
using UnityEngine.Rendering.Universal;
|
|
118
|
+
|
|
119
|
+
public sealed class CustomFullscreenEffectFeature : ScriptableRendererFeature
|
|
120
|
+
{
|
|
121
|
+
sealed class CustomFullscreenEffectPass : ScriptableRenderPass
|
|
122
|
+
{
|
|
123
|
+
readonly ProfilingSampler m_ProfilingSampler = new("CustomFullscreenEffect");
|
|
124
|
+
Material m_Material;
|
|
125
|
+
RTHandle m_TemporaryColor;
|
|
126
|
+
|
|
127
|
+
public CustomFullscreenEffectPass(Material material)
|
|
128
|
+
{
|
|
129
|
+
m_Material = material;
|
|
130
|
+
renderPassEvent = RenderPassEvent.AfterRenderingPostProcessing;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
public override void OnCameraSetup(CommandBuffer cmd, ref RenderingData renderingData)
|
|
134
|
+
{
|
|
135
|
+
var descriptor = renderingData.cameraData.cameraTargetDescriptor;
|
|
136
|
+
descriptor.depthBufferBits = 0;
|
|
137
|
+
RenderingUtils.ReAllocateIfNeeded(ref m_TemporaryColor, descriptor, name: "_CustomFullscreenEffectTemp");
|
|
138
|
+
}
|
|
139
|
+
|
|
140
|
+
public override void Execute(ScriptableRenderContext context, ref RenderingData renderingData)
|
|
141
|
+
{
|
|
142
|
+
if (m_Material == null)
|
|
143
|
+
return;
|
|
144
|
+
|
|
145
|
+
var cmd = CommandBufferPool.Get();
|
|
146
|
+
using (new ProfilingScope(cmd, m_ProfilingSampler))
|
|
147
|
+
{
|
|
148
|
+
var source = renderingData.cameraData.renderer.cameraColorTargetHandle;
|
|
149
|
+
Blitter.BlitCameraTexture(cmd, source, m_TemporaryColor, m_Material, 0);
|
|
150
|
+
Blitter.BlitCameraTexture(cmd, m_TemporaryColor, source);
|
|
151
|
+
}
|
|
152
|
+
context.ExecuteCommandBuffer(cmd);
|
|
153
|
+
CommandBufferPool.Release(cmd);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
public void Dispose()
|
|
157
|
+
{
|
|
158
|
+
m_TemporaryColor?.Release();
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
[SerializeField] Material m_Material;
|
|
163
|
+
CustomFullscreenEffectPass m_Pass;
|
|
164
|
+
|
|
165
|
+
public override void Create()
|
|
166
|
+
{
|
|
167
|
+
m_Pass = new CustomFullscreenEffectPass(m_Material);
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
public override void AddRenderPasses(ScriptableRenderer renderer, ref RenderingData renderingData)
|
|
171
|
+
{
|
|
172
|
+
if (m_Material != null)
|
|
173
|
+
renderer.EnqueuePass(m_Pass);
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
protected override void Dispose(bool disposing)
|
|
177
|
+
{
|
|
178
|
+
m_Pass?.Dispose();
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
Use this as a starting point, not a guarantee. The exact pass event, intermediate texture needs, camera stacking behavior, XR handling, and RenderGraph path may need adjustment for the target URP version.
|
|
184
|
+
|
|
185
|
+
## Case 4: Replacement Shader and Alternate-Camera Rendering Workflows
|
|
186
|
+
|
|
187
|
+
Indicators:
|
|
188
|
+
|
|
189
|
+
- `RenderWithShader`
|
|
190
|
+
- `SetReplacementShader`
|
|
191
|
+
- camera-based normal/depth/edge pipelines
|
|
192
|
+
|
|
193
|
+
Implication:
|
|
194
|
+
|
|
195
|
+
- These workflows often depend on Built-in rendering assumptions and pass tags.
|
|
196
|
+
|
|
197
|
+
Safer migration path:
|
|
198
|
+
|
|
199
|
+
1. Identify the purpose of the replacement pass — outlines, selection, depth, normals, masks, and so on.
|
|
200
|
+
2. Determine whether URP already exposes a better path through renderer configuration, depth/normal textures, or a custom pass.
|
|
201
|
+
3. If a custom shader is still required, port the shader with explicit URP pass/tag expectations instead of assuming Built-in tags still drive the same behavior.
|
|
202
|
+
|
|
203
|
+
## Case 5: Multi-Pass, Custom Lighting, and Deferred-Specific Shaders
|
|
204
|
+
|
|
205
|
+
Indicators:
|
|
206
|
+
|
|
207
|
+
- many passes in one shader
|
|
208
|
+
- custom forward-add or deferred assumptions
|
|
209
|
+
- lighting code tightly coupled to Built-in helper includes
|
|
210
|
+
- shaders that need specific deferred compatibility
|
|
211
|
+
|
|
212
|
+
Implication:
|
|
213
|
+
|
|
214
|
+
- These are not simple "replace includes and tags" conversions.
|
|
215
|
+
|
|
216
|
+
Safer migration path:
|
|
217
|
+
|
|
218
|
+
1. Determine which passes are still needed in URP.
|
|
219
|
+
2. If the shader must support URP Deferred, validate the required URP pass tags and rendering-path behavior.
|
|
220
|
+
3. If the shader can be forward-only, say so explicitly and scope the port accordingly.
|
|
221
|
+
4. Expect multiple validation rounds.
|
|
222
|
+
|
|
223
|
+
## Case 6: Package-Owned and Framework Shaders
|
|
224
|
+
|
|
225
|
+
Indicators:
|
|
226
|
+
|
|
227
|
+
- Asset Store shader frameworks
|
|
228
|
+
- water, foliage, toon, outline, dissolve, or special rendering packages
|
|
229
|
+
- package namespace includes or generated shader code
|
|
230
|
+
|
|
231
|
+
Implication:
|
|
232
|
+
|
|
233
|
+
- These are not safe to rewrite blindly. They may need maintainer guidance, a scoped custom replacement, or manual follow-up if the project does not already contain an approved URP-compatible path.
|
|
234
|
+
|
|
235
|
+
Safer migration path:
|
|
236
|
+
|
|
237
|
+
1. Identify the exact materials and shader files affected.
|
|
238
|
+
2. Do not edit immutable package files or generated shader internals in bulk.
|
|
239
|
+
3. Use local material copies or scoped custom replacements when the user approves that approach.
|
|
240
|
+
4. Limit manual ports to the exact materials the user needs and call out the risk clearly.
|
|
241
|
+
|
|
242
|
+
## Case 7: Foliage, Grass, Tree, and Billboard Shaders
|
|
243
|
+
|
|
244
|
+
Indicators:
|
|
245
|
+
|
|
246
|
+
- grass, tree, bush, leaf, terrain detail, SpeedTree, billboard, or vegetation material names
|
|
247
|
+
- `Nature/`, `TreeCreator`, `Grass`, `Foliage`, or similar shader names
|
|
248
|
+
- cutout or alpha-test properties such as `_Cutoff`, `_AlphaClip`, `_AlphaTest`, or alpha threshold keywords
|
|
249
|
+
- culling, two-sided, billboard, wind, bend, hue variation, or terrain-detail keywords
|
|
250
|
+
|
|
251
|
+
Implication:
|
|
252
|
+
|
|
253
|
+
- A grass or tree material can be "not pink" but still wrong if the converter drops alpha clipping, two-sided leaf rendering, wind, billboard behavior, normals, tint, or terrain detail integration.
|
|
254
|
+
- Plain URP Lit can be acceptable only for simple opaque bark or non-specialized meshes. It is usually not enough for grass cards, leaf cards, billboards, or wind-driven foliage.
|
|
255
|
+
|
|
256
|
+
Safer migration path:
|
|
257
|
+
|
|
258
|
+
1. Separate bark/opaque mesh materials from leaf, grass, billboard, and terrain-detail materials.
|
|
259
|
+
2. For simple bark/opaque materials, preserve base map, color, normal, metallic/smoothness, and tiling/offset.
|
|
260
|
+
3. For foliage cards, preserve base texture, tint, alpha cutoff, transparent/cutout intent, culling/two-sided intent, and normal/detail maps.
|
|
261
|
+
4. Do not call foliage complete until a representative scene/camera confirms grass and leaves are not solid opaque quads.
|
|
262
|
+
5. If wind, billboard, or terrain-detail behavior cannot be preserved in the current pass, report that exact behavior as manual/custom-shader follow-up instead of claiming full visual parity.
|
|
263
|
+
|
|
264
|
+
## Stop-and-Escalate Signals
|
|
265
|
+
|
|
266
|
+
Stop and summarize the blocker instead of guessing when:
|
|
267
|
+
|
|
268
|
+
- multiple high-risk shader categories overlap in the same project
|
|
269
|
+
- the effect depends on undocumented package internals
|
|
270
|
+
- the shader compiles but visual parity is clearly not explainable by parameter tuning
|
|
271
|
+
- the project relies heavily on custom fullscreen or replacement-shader rendering paths
|
|
272
|
+
- the user expects production-safe parity but the port strategy is still exploratory
|