@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,52 @@
|
|
|
1
|
+
# Scene Lighting
|
|
2
|
+
|
|
3
|
+
> Craft reference for the `craft-game-floors` skill. **Load:** immediately after the first scene exists in any 3D build — or on first touching a 3D scene still lit by the template's defaults. Post-effect mechanics live in `urp-postprocessing` — this reference says *which* values; that skill says *how*. Sibling links resolve to the skill directory. Confirm engine behavior against the linked documentation for the installed version before acting on it.
|
|
4
|
+
|
|
5
|
+
## The opinion
|
|
6
|
+
|
|
7
|
+
Light tells the scene's story. The un-opinionated default — one white directional at noon over flat gray ambient — is why agent-built games look like documents. Every 3D scene built under these floors (the paved default — and any scene this skill touches) gets the baseline below before gameplay authoring continues. The values in this reference supersede the project baseline's and `urp-postprocessing`'s own starting points; that skill remains the mechanics and debugging reference for the Volume framework itself.
|
|
8
|
+
|
|
9
|
+
## The key light
|
|
10
|
+
|
|
11
|
+
- One directional, **warm-tinted from the palette** ([art-direction](art-direction.md); toward `#FFF2DC`, never pure white), intensity ~1.1–1.3.
|
|
12
|
+
- Elevation 35–50°, azimuth angled across the play axis so faces get light/shadow variation (never straight down, never behind camera).
|
|
13
|
+
- Soft shadows on; shadow distance sized to the playable space, not the pipeline default (URP ships 50 m; Built-in 150 m).
|
|
14
|
+
|
|
15
|
+
## The ambient answer (the half everyone skips)
|
|
16
|
+
|
|
17
|
+
Environment lighting → **Gradient**: sky = cool tint from the palette, equator = neutral mid, ground = dark warm. This is what keeps shadow sides alive instead of dead gray. For toon styles the ambient is doing the "bounce" the ramp can't.
|
|
18
|
+
|
|
19
|
+
## The global Volume (via `urp-postprocessing`)
|
|
20
|
+
|
|
21
|
+
One global [Volume](https://docs.unity.com/en-us/engine/<VERSION>/manual/post-processing-and-full-screen-effects/urp/volumes-landing-page.md) asset, always — and **first, check the camera**: a script-created camera's `UniversalAdditionalCameraData` defaults `renderPostProcessing` to false (template cameras ship with it on), and the whole Volume silently does nothing until it is enabled.
|
|
22
|
+
|
|
23
|
+
**[Bloom](https://docs.unity.com/en-us/engine/<VERSION>/manual/post-processing-and-full-screen-effects/urp/effect-list/bloom.md) needs HDR here** — with SDR's 0–1 colors the threshold values below never fire (the skill's own trap note; the Bloom page doesn't state it). Confirm HDR on the active URP asset (and not overridden off on the camera); a build that must stay SDR runs Threshold 0.9 with Intensity halved.
|
|
24
|
+
|
|
25
|
+
Baseline starting values:
|
|
26
|
+
|
|
27
|
+
| Override | Start | Why |
|
|
28
|
+
|---|---|---|
|
|
29
|
+
| Tonemapping | ACES (Neutral for flat toon looks) | free depth and rolloff |
|
|
30
|
+
| Bloom | intensity 0.25–0.4, threshold 1.1 (HDR on) | glow on accents/pickups only |
|
|
31
|
+
| Vignette | 0.2–0.25 | frames the action |
|
|
32
|
+
| Color Adjustments | saturation +8, contrast +5 | counters engine-default flatness |
|
|
33
|
+
|
|
34
|
+
Interiors: consider palette-tinted fog for depth. Skip AO on toon styles (fights the bands); consider it on stylized-lit ones.
|
|
35
|
+
|
|
36
|
+
## Per-mood variants (worked)
|
|
37
|
+
|
|
38
|
+
Starting points keyed to the worked bibles in [art-direction](art-direction.md) — tune from the matching row, never from zero.
|
|
39
|
+
|
|
40
|
+
| Mood | Key light | Tonemapping | Bloom | Vignette | Color Adjustments | Extras |
|
|
41
|
+
|---|---|---|---|---|---|---|
|
|
42
|
+
| Cozy interior | warm `#FFE8C8`, 1.15, elev 38° | ACES | 0.3 @ 1.1 | 0.25 | sat +8, contrast +5 | White Balance temp +10; faint palette-tinted fog |
|
|
43
|
+
| Bright arcade | cool dim `#CFE6FF`, 0.6, elev 60° | Neutral | 0.8 @ 0.9 | 0.18 | sat +15, contrast +10 | emissive materials carry the light; ambient from the bounds color |
|
|
44
|
+
| Moody sci-fi | cool hard `#BFD2E6`, 1.3, elev 55° | ACES | 0.35 @ 1.2 | 0.3 | sat −5, contrast +12 | White Balance temp −8; fog tinted from the shadow value |
|
|
45
|
+
|
|
46
|
+
## Verify
|
|
47
|
+
|
|
48
|
+
**This verify is URP-typed** — establish the pipeline first (`GraphicsSettings.currentRenderPipeline`; the router's mid-flow check does this). On Built-in or HDRP, apply this file's light-story opinions (key, ambient, mood) but skip the URP checks and name the pipeline gap in the report — `UniversalAdditionalCameraData` and the URP Volume types don't exist there, and `urp-postprocessing` stops by design when URP is inactive. Under URP, machine checks first (via `unity-cli` eval): the camera's `UniversalAdditionalCameraData.renderPostProcessing` reads true, and the global Volume's profile reports all four overrides present and active. Then capture with the Volume enabled and disabled and diff the two PNGs — a mean per-channel delta that rounds to zero means the settings are too timid; raise until the diff is unmistakable, then pull back one notch. Keep each tuning eval short: a timed-out `eval` may still have executed, so long sweeps go through `run_script` instead.
|
|
49
|
+
|
|
50
|
+
## Expansion scope
|
|
51
|
+
|
|
52
|
+
Baked GI / light-probe workflows, time-of-day rigs, per-scene Volume blending, mobile/web budget variants, HDRP parity.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# Toon Shading
|
|
2
|
+
|
|
3
|
+
> Craft reference for the `craft-game-floors` skill. **Load:** when the art bible picks a cel/toon/anime style — and if no art bible exists yet, author one first via the look floor ([art-direction](art-direction.md)). Sibling links resolve to the skill directory. Confirm engine behavior against the linked documentation for the installed version before acting on it.
|
|
4
|
+
|
|
5
|
+
## The opinion
|
|
6
|
+
|
|
7
|
+
One toon shader family for the **whole frame**. Characters, walls, props, floor — all of it. A cel-shaded hero in a PBR room is the canonical broken look.
|
|
8
|
+
|
|
9
|
+
## The ramp (URP, Unity 6)
|
|
10
|
+
|
|
11
|
+
Two routes; pick by what's in the project:
|
|
12
|
+
|
|
13
|
+
- **Shader Graph route** — the lighting lives in a [Custom Function node](https://docs.unity3d.com/Packages/com.unity.shadergraph@<VERSION>/manual/Custom-Function-Node.html), because Shader Graph exposes no main-light data as built-in nodes. Inside the function, call `GetMainLight()` and quantize `NdotL` into 2–3 hard bands via `smoothstep` with a narrow edge (0.02–0.05) so bands stay crisp but antialiased. Two requirements, mechanics on the linked pages:
|
|
14
|
+
- Give the function a preview-safe branch per the Custom Function node page above (previews have no light data).
|
|
15
|
+
- For cast shadows, pass `GetMainLight` a shadow coord and declare the three main-light shadow [keywords](https://docs.unity3d.com/Packages/com.unity.shadergraph@<VERSION>/manual/Keywords.html) (`_MAIN_LIGHT_SHADOWS`, `_MAIN_LIGHT_SHADOWS_CASCADE`, `_SHADOWS_SOFT` — Boolean, Global, Multi Compile), or `shadowAttenuation` reads 1 everywhere.
|
|
16
|
+
- `shader-graph-create-custom-node` turns finished HLSL into a reflected function node (it needs `com.unity.shadergraph` 17.5 or newer); the graph wiring above stays this reference's recipe.
|
|
17
|
+
- **Hand-written HLSL route** — a single ~120-line URP shader covers it. Same quantized-NdotL core; add `_BaseColor`, `_ShadowTint`, `_Bands`.
|
|
18
|
+
|
|
19
|
+
Either way: **shadow bands are palette-tinted, never black** — sample the art bible's shadow color (usually a cooler, darker sibling of the base) — and main-light shadow attenuation multiplies into the band input on both routes so cast shadows band too.
|
|
20
|
+
|
|
21
|
+
## Outlines
|
|
22
|
+
|
|
23
|
+
- **Inverted hull** (default): a second pass/material extruding vertices along normals in clip space, front-face culled. Width in screen space (~2 px equivalent) so it doesn't collapse with distance; outline color = palette's darkest value, not black.
|
|
24
|
+
- **Renderer Feature** (whole-frame route): a fullscreen edge pass on depth+normals when you want environment edges too. Prefer this when the environment is mostly flat walls — hull outlines on giant planes look wrong. The feature is Render Graph code: run `validate-urp-render-graph-renderer-feature` over it before trusting it.
|
|
25
|
+
|
|
26
|
+
## The supporting cast
|
|
27
|
+
|
|
28
|
+
- **Skybox**: gradient from the palette (simple shader or tinted procedural) — the default blue procedural sky instantly breaks the style.
|
|
29
|
+
- **Fog**: if used, tinted from the palette.
|
|
30
|
+
- **Verify** (via `unity-cli`): machine scan first — eval over every renderer in frame asserting `sharedMaterial.shader.name` belongs to the toon family, with zero hits on `Universal Render Pipeline/Lit` (any hit names the object to convert) — then capture: bands visible on a curved surface, outlines uniform at two capture distances.
|
|
31
|
+
|
|
32
|
+
## Expansion scope
|
|
33
|
+
|
|
34
|
+
Ramp textures for painterly grades, rim/specular toon terms, face-shadow maps for characters, 2D-lit variant, VFX Graph toon integration, per-object outline masks.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# VFX
|
|
2
|
+
|
|
3
|
+
> Craft reference for the `craft-game-floors` skill. Relative links in this file resolve to the skill directory. **Load:** during the feel pass and whenever an effect is needed — [game-feel](game-feel.md) says *when* effects fire; this reference says *what* they look like. Colors come from [art-direction](art-direction.md)'s palette; glow interplay from [scene-lighting](scene-lighting.md)'s bloom threshold. Confirm engine behavior against the linked documentation for the installed version before acting on it.
|
|
4
|
+
|
|
5
|
+
## The rules (every effect, no exceptions)
|
|
6
|
+
|
|
7
|
+
- **Palette only** — start/gradient colors sampled from the art bible; a white default particle breaks style as hard as a gray material.
|
|
8
|
+
- **Short-lived** — 0.3–0.8 s lifetimes for event effects; size-over-lifetime shrinks to zero so nothing pops out of existence.
|
|
9
|
+
- **Readable at gameplay distance** — size and count tuned against the real camera ([camera-rigs](camera-rigs.md)), verified by capture, not in the inspector.
|
|
10
|
+
- **Pooled** — never Instantiate/Destroy per event. Reuse one ParticleSystem via `Stop`/`Clear`/`Play` (or one system with `Emit()`); when effects need real instances, pool them with [`UnityEngine.Pool.ObjectPool<T>`](https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Pool.ObjectPool_1.html) — built into the engine, zero dependency. Construct it with a createFunc plus actionOnGet/actionOnRelease so reset-on-release is baked in; take with `Get()`, return with `Release(item)`.
|
|
11
|
+
- **Nothing loops without a job** — a looping effect must be telling the player something (a shrine glows because it's interactive).
|
|
12
|
+
|
|
13
|
+
## The recipes (URP, built-in ParticleSystem)
|
|
14
|
+
|
|
15
|
+
- **Pickup burst** — 8–12 particles, sphere emission, radial start speed 2–3, slight gravity, palette accent → transparent gradient. Pair with the pop + blip ([game-feel](game-feel.md)).
|
|
16
|
+
- **Trail** — for moving collectibles and guides (the butterfly case): a small emitter with rate-over-distance, 0.5 s lifetime, shrinking. Sells motion better than the mover itself.
|
|
17
|
+
- **Ambient motes** — the interior seller: slow-drifting dust in the key light's direction, 10–20 alive, barely-visible palette-light color, large box emitter above the play space. This one effect makes a room feel inhabited.
|
|
18
|
+
- **Milestone confetti** — 30–50 particles, cone up, gravity on, 2–3 palette colors, 1.2 s — reserved for the full-screen moments so they stay special.
|
|
19
|
+
- **Movement puffs** — tiny 3–4 particle poofs on footfall/landing, ground-colored, 0.3 s.
|
|
20
|
+
|
|
21
|
+
Material — the paved default: `Sprites/Default` (or URP particle-unlit explicitly set to Transparent) tinted from the palette; the failure table below has the two traps. Additive/glow sparingly and only above the bloom threshold on purpose — one glowing thing per frame is an accent; five is soup.
|
|
22
|
+
|
|
23
|
+
## 2D delta
|
|
24
|
+
|
|
25
|
+
In a 2D scene, particles sort through the renderer like every sprite: set Sorting Layer and Order in Layer on the [`ParticleSystemRenderer`](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unityengine/particlesystemrenderer.md) (both inherited from `Renderer`) so effects draw above the sprites they comment on and below UI. Sorting Layer beats camera distance — an effect on the wrong layer hides behind the background no matter its Z.
|
|
26
|
+
|
|
27
|
+
## Failure modes
|
|
28
|
+
|
|
29
|
+
| Symptom | Root cause | Fix |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| particles render fully opaque despite an alpha tint | URP particle-unlit ignores alpha while Surface Type is Opaque | use `Sprites/Default`, or set the material's Surface Type to Transparent (or enable Alpha Clipping) |
|
|
32
|
+
| console floods with curve errors while animating velocity over lifetime | the x/y/z curves are in mixed modes (two set, one left default) | set **all three axes** in the same curve mode |
|
|
33
|
+
|
|
34
|
+
## Verify
|
|
35
|
+
|
|
36
|
+
Capture mid-effect at the gameplay camera (the done gate's "feedback visibility" axis needs the effect *in* the frame) — and time the capture by eval, not luck: assert the system's `particleCount > 0` at the capture moment. Pooling check: fire the effect ten times and assert the ParticleSystem instance count stayed constant before and after (a growing count means an Instantiate leaked in). Check the ambient motes read in a still — if they only register in motion, raise size slightly, never count.
|
|
37
|
+
|
|
38
|
+
## Expansion scope
|
|
39
|
+
|
|
40
|
+
VFX Graph for GPU-scale effects, shader-driven dissolves/impacts, decals, screen-space effects (speed lines, damage vignettes), effect LOD and budgets per platform.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Visual Scorecard
|
|
2
|
+
|
|
3
|
+
> Craft reference for the `craft-game-floors` skill. **Load:** at the end of every build session and after any visual change worth verifying. A single-floor touch-up owes only that floor's own Verify section; the full board below is the build session's done gate. Capture mechanics live in `unity-cli` (editor_play → capture_game_view → eval). Relative links in this file resolve to the skill directory. Confirm engine behavior against the linked documentation for the installed version before acting on it.
|
|
4
|
+
|
|
5
|
+
## The rule
|
|
6
|
+
|
|
7
|
+
**The first capture is a draft, never the deliverable.** A build session under these floors (any paved build) ends with scored frames, not a green compile. "It runs" and "it's done" are different claims; this gate is the difference.
|
|
8
|
+
|
|
9
|
+
## Procedure
|
|
10
|
+
|
|
11
|
+
1. **Record the Editor's starting state first** — whether Play mode is already running (a user-owned session is never restarted or stopped: score inside it or ask), and the current auto-tick and `runInBackground` values, so both can be restored after the gate. Then prove liveness with this four-call loop before trusting any capture: `editor set_auto_tick on` · script eval [`Application.runInBackground`](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unityengine/application/runinbackground.md) `= true` · `editor.playmode start` · a job wait on `Time.frameCount` with op `changed`. The command names here are the installed pipeline package's — confirm them with `unity command` before running. Run the loop every time: capture-on-demand renders frozen games as alive, and an unfocused Editor can freeze play at frame 1–2 while status still reports playing. **After the gate, restore the recorded auto-tick and `runInBackground` values and exit Play if the gate started it.**
|
|
12
|
+
2. Render a warm-up frame and discard it before every scored capture — the first render after a rebuild comes back blank (async shader compile).
|
|
13
|
+
3. Capture **three frames**: the standard gameplay angle · a character close-up · the busiest UI moment (mid-pickup or milestone, so feedback is *in* the frame). **UI in captures:** game-view capture can skip ScreenSpaceOverlay canvases entirely while the canvas is provably alive — for any frame that must show UI, either use a screen-level capture source where the installed pipeline package offers one (confirm its capture flags — names and `--view` options vary by version) or put the HUD on a ScreenSpaceCamera canvas, which renders in every capture path. Verify UI presence in the frame, not in the hierarchy. **Driving the game for captures:** simulated key events may not reach Input System polling in editor play mode — when a verification drive needs movement, compile a small debug-input hook into the controller rather than fighting the input simulator. **Where captures land:** `capture game_view` writes to `Assets/Captures/` — add `Assets/Captures/` to .gitignore before the first capture.
|
|
14
|
+
4. Score each axis 1–5. The palette-discipline instant fail is machine-checkable first: eval-scan every renderer for `Default-Material`, TMP for the stock font **left at default settings** (a deliberately styled stock font passes — placeholder-assets prescribes exactly that), **every ParticleSystem's startColor and every HUD panel Image for untinted white/gray** (the two elements that most often slip the palette while passing the material scan; a white sprite tint that deliberately preserves the sprite's own colors also passes — the scan flags defaults, not choices), before scoring — so axis 1's fail never rests on eyesight alone. **If the request authorized changes**, anything below 3 gets a fix, and spend at least one fix pass even on a passing board; **on an assessment-only ask** ("score it"), report the board and the recommended fixes and change nothing until the user says go. When tuning live via `eval`: a timed-out eval may still have executed — mutations are not idempotent-safe; long work goes through `run_script`.
|
|
15
|
+
|
|
16
|
+
## The six axes
|
|
17
|
+
|
|
18
|
+
| Axis | The question | Instant fail |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| Palette discipline | Does every color trace to the art bible? | default-gray material, skybox, or UI anywhere |
|
|
21
|
+
| Style uniformity | One style across character, environment, sky, UI? | style breaks at the character's edge |
|
|
22
|
+
| Lighting depth | Warm/cool separation? Shadow sides alive? | flat white directional look |
|
|
23
|
+
| Silhouette | Is the character identifiable filled black? Grade from the gameplay camera angle as well as a side view. | reads as "capsules" |
|
|
24
|
+
| UI intentionality | HUD on the palette, aligned, styled text? | default uGUI skin visible |
|
|
25
|
+
| Feedback visibility | Does the busy frame *show* the game answering the player? | a pickup frame with nothing happening |
|
|
26
|
+
|
|
27
|
+
## The 2D anchor set
|
|
28
|
+
|
|
29
|
+
For a 2D build, grade the same six questions through their 2D equivalents: palette discipline = every sprite tint traces to the bible (no default-white sprites); style uniformity = one consistent pixel density across all sprites, no mixed-resolution art; silhouette = the character reads at gameplay zoom, not just in the source asset; lighting depth = outline discipline instead — either every gameplay-critical sprite carries the outline treatment or none does; UI intentionality and feedback visibility grade unchanged. Where a 2D floor is missing, name the gap in the report rather than grading against a 3D axis the build cannot meet.
|
|
30
|
+
|
|
31
|
+
## Calibration anchors
|
|
32
|
+
|
|
33
|
+
- **5** — a promo still from a stylized indie (Monument Valley, A Short Hike): total palette and style discipline.
|
|
34
|
+
- **3** — a polished jam entry: simple assets, but deliberate light, consistent style, styled UI. **The paved floor — the minimum any build under these floors ships at.**
|
|
35
|
+
- **1** — untextured primitives under one white directional with default-gray UI: the documented starting point this gate exists to abolish.
|
|
36
|
+
|
|
37
|
+
## Report
|
|
38
|
+
|
|
39
|
+
Print the board in one fixed grammar — one line per axis, `axis: <score>/5 — <one-line evidence>` — so a later session can parse it, then what the fix pass changed, and attach the final captures. The scored frames are the session's proof-of-done artifact.
|
|
40
|
+
|
|
41
|
+
## Expansion scope
|
|
42
|
+
|
|
43
|
+
Baseline captures + visual regression across sessions, resolution/aspect sweeps, colorblind-safety check, bot-driven capture routes, per-genre anchor packs.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Security notes: create-2d-physics
|
|
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,128 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: create-2d-physics
|
|
3
|
+
description: "Creates and fixes Unity 2D physics in both systems, 2D Physics Core and the legacy Rigidbody 2D system. Use when the user asks about any 2D physics task, even if neither system is named. Not for 3D physics."
|
|
4
|
+
allowed-tools: WebFetch, WebSearch
|
|
5
|
+
metadata:
|
|
6
|
+
version: 0.3.0
|
|
7
|
+
support: "https://unity.com/support-services"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Create and fix Unity 2D physics
|
|
11
|
+
|
|
12
|
+
Do not weigh 3D physics options. If evidence shows the user means 3D, say so and stop.
|
|
13
|
+
|
|
14
|
+
## Important
|
|
15
|
+
|
|
16
|
+
- Use the unity cli (`unity command --format json`) and the `unity-cli` and `unity-pipeline` skills for each step.
|
|
17
|
+
- Before making changes, establish a baseline of the current behavior so you can tell whether a later result is actually caused by your change.
|
|
18
|
+
- Create a restore point you can roll back to if your changes fail.
|
|
19
|
+
- Do only what's asked. Don't change unrelated assets or files.
|
|
20
|
+
- Avoid long explanations.
|
|
21
|
+
- Verify runtime behaviour with temporary `Debug.Log` lines, then remove them, because the user didn't ask for logging and leftover lines clutter their script and console. Don't build settle-detection or permanent logging they didn't ask for. See [Final step](#final-step).
|
|
22
|
+
- Never reflect over types to discover an API — fetch the member page instead. The system probe is the one exception.
|
|
23
|
+
|
|
24
|
+
### Passing C# to `script eval`
|
|
25
|
+
|
|
26
|
+
`script eval` compiles a statement block, not a file, so write the code without `using` directives and with fully qualified types. `return` what you want to read; it arrives at `data.result.result`. If the code doesn't compile, look up the error here:
|
|
27
|
+
|
|
28
|
+
| Error | Cause | Fix |
|
|
29
|
+
| --- | --- | --- |
|
|
30
|
+
| `CS0210` | A `using` directive, which the compiler reads as a resource-disposal statement | Remove the directive and qualify the types |
|
|
31
|
+
| `CS0246` / `CS0103` | An unqualified type, such as `Rigidbody2D` or `PhysicsWorld` | Use the full name, such as `UnityEngine.Rigidbody2D` or `Unity.U2D.Physics.PhysicsWorld` |
|
|
32
|
+
| `CS0104` | A bare `Object`, which is ambiguous with `object` | Use `UnityEngine.Object` |
|
|
33
|
+
|
|
34
|
+
## Step 0: Which physics system
|
|
35
|
+
|
|
36
|
+
Unity has two 2D physics systems. They share no code and never interact. Identify which one before writing any physics code — an answer from the wrong system compiles, runs, and does nothing.
|
|
37
|
+
|
|
38
|
+
Check the request, scene and existing scripts against the table below, in this order:
|
|
39
|
+
|
|
40
|
+
1. Check the scene components and existing scripts first, because components are the reliable signal.
|
|
41
|
+
2. Check the user's request wording: "add a collider" is component language, "spawn a thousand" is script language.
|
|
42
|
+
3. If still unsure which systems are installed, run the probe below.
|
|
43
|
+
4. If the route is still unknown, stop and ask — offer all three routes and never choose for the user.
|
|
44
|
+
|
|
45
|
+
| Signal | System |
|
|
46
|
+
| --- | --- |
|
|
47
|
+
| Physics Pose, Area, Constraint or Simulation components | Core components, 6000.7+ with the package |
|
|
48
|
+
| Rigidbody 2D, Collider 2D, Joint 2D, Effector 2D | Legacy |
|
|
49
|
+
| `Unity.U2D.Physics` or `UnityEngine.LowLevelPhysics2D` types in script | Core in script |
|
|
50
|
+
| `Rigidbody2D`, `Collider2D`, `Physics2D` types | Legacy |
|
|
51
|
+
| Both present | Separate simulations. Say so, treat separately |
|
|
52
|
+
| No signal | Stop and ask, offering the three routes above |
|
|
53
|
+
|
|
54
|
+
Key:
|
|
55
|
+
- Legacy = Rigidbody 2D and Collider 2D components.
|
|
56
|
+
- Core components = Physics Pose and Physics Area, requiring `com.unity.2d.physics` and Unity 6000.7+.
|
|
57
|
+
- Core in script = `Unity.U2D.Physics` API, no package needed.
|
|
58
|
+
|
|
59
|
+
Probe:
|
|
60
|
+
```
|
|
61
|
+
unity command script eval --caller plugin --skill create-2d-physics --code 'var r = ""; foreach (var n in new[] { "UnityEngine.Rigidbody2D", "Unity.U2D.Physics.PhysicsWorld", "UnityEngine.LowLevelPhysics2D.PhysicsWorld", "Unity.U2D.Physics.PhysicsPose" }) { var f = false; foreach (var a in System.AppDomain.CurrentDomain.GetAssemblies()) if (a.GetType(n) != null) f = true; r += f + ","; } return r;'
|
|
62
|
+
```
|
|
63
|
+
The Probe returns: legacy present, Core as `Unity.U2D.Physics`, Core as `UnityEngine.LowLevelPhysics2D`, Core components present. Core exists if either Core value is true; the true one gives the namespace. `false` rules that route out.
|
|
64
|
+
|
|
65
|
+
## Full topic map
|
|
66
|
+
|
|
67
|
+
Before you go forward with a workflow or diagnosis:
|
|
68
|
+
|
|
69
|
+
1. Open and read the [documentation page(s)](#full-topic-map) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
|
|
70
|
+
2. Name the file(s) you read in your response.
|
|
71
|
+
|
|
72
|
+
This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.
|
|
73
|
+
|
|
74
|
+
Prefer `WebFetch` over `WebSearch` — faster and lands on the exact reference. Only fetch what you need. Replace `<VERSION>` with the following before fetching:
|
|
75
|
+
|
|
76
|
+
- **Package on docs.unity3d.com**: The package version, eg `@6.6` or `@2.0`. Check the package version if unsure.
|
|
77
|
+
- **docs.unity.com**: The product version, eg `7000.0`
|
|
78
|
+
|
|
79
|
+
For docs.unity.com engine pages, use the Unity version, e.g. `6000.7`. Pages are markdown — URLs end in `.md`. Find the package version in `Packages/packages-lock.json`, because `manifest.json` can hold a range or a git URL instead of the resolved version.
|
|
80
|
+
|
|
81
|
+
If the Editor install folder has a `Data/Documentation` folder (eg `...Unity/Hub/Editor/6000.6.0b2/Editor/Data/Documentation`), read the html files from the `en/Manual` folder. Otherwise use the online `.md` pages listed in the references below.
|
|
82
|
+
|
|
83
|
+
Once you know the route, read the matching reference before acting:
|
|
84
|
+
- [2D Physics Core reference](references/2d-physics-core.md) - components, configuring them, creating bodies in script, ownership, and the full Core topic map.
|
|
85
|
+
- [Legacy 2D physics reference](references/legacy-2d-physics.md) - the legacy manual topic map.
|
|
86
|
+
|
|
87
|
+
### API reference
|
|
88
|
+
|
|
89
|
+
The Core and legacy APIs (`Unity.U2D.Physics` or `UnityEngine.LowLevelPhysics2D`, and `UnityEngine.Rigidbody2D`, `Collider2D`, `Physics2D`) are part of the Unity Engine. They are versioned by Unity version, so check the project's Unity version before relying on a specific class or method.
|
|
90
|
+
|
|
91
|
+
1. Use the `unity-cli` skill to check the project's Unity version.
|
|
92
|
+
2. If the Editor install folder has a `Data/Documentation` folder, grep the html files in the `en/ScriptReference` folder inside, and skip the remaining steps.
|
|
93
|
+
3. Otherwise, fetch and cache `https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/xrefmap.yml` (replace `<VERSION>` with the project's Unity version in major.minor form). This file lists every public API member's fully qualified name as a `uid` (e.g. `uid: 'UnityEngine.Rigidbody2D.AddForce(UnityEngine.Vector2,UnityEngine.ForceMode2D)'`).
|
|
94
|
+
4. Grep the yml file locally for a class or method instead of refetching per lookup. The file is large (about 6 MB), so don't read the whole file.
|
|
95
|
+
5. Convert the `uid` to a markdown page: remove the parameters in brackets, lowercase it, replace `.` with `/`, and add `.md`. Then fetch `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/<converted uid>`. For example, `UnityEngine.Rigidbody2D.AddForce(UnityEngine.Vector2,UnityEngine.ForceMode2D)` => `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unityengine/rigidbody2d/addforce.md`. All overloads are on the same page.
|
|
96
|
+
- Constructors use `ctor` (e.g. `unityengine/vector2/ctor.md`), and indexers use `item` (e.g. `unityengine/vector2/item.md`).
|
|
97
|
+
- For operators, fetch the class page (e.g. `unityengine/vector2.md`) and follow its link.
|
|
98
|
+
- Links inside the pages start with `/engine/`. Add `https://docs.unity.com/en-us` before them.
|
|
99
|
+
- If the page doesn't exist for that Unity version, use the `href` in the `xrefmap.yml` entry instead (e.g. `href: 'Rigidbody2D.AddForce.html'` => `https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Rigidbody2D.AddForce.html`).
|
|
100
|
+
|
|
101
|
+
The Core **components** (Physics Pose, Area, Constraint, Simulation) are in the `Unity.U2D.Physics` namespace of the `com.unity.2d.physics` package. They are versioned by package version, not Unity version, so check the installed package version before relying on a specific class or method.
|
|
102
|
+
|
|
103
|
+
1. Use the `unity-cli` skill to check the installed package version.
|
|
104
|
+
2. Fetch and cache `https://docs.unity3d.com/Packages/com.unity.2d.physics@<version>/xrefmap.yml` (replace `<version>` with the installed package version in major.minor form). This file maps every public API member's fully qualified name to its docs page `href` (e.g. `href: api/Unity.U2D.Physics.PhysicsPose.html` => `https://docs.unity3d.com/Packages/com.unity.2d.physics@<version>/api/Unity.U2D.Physics.PhysicsPose.html`).
|
|
105
|
+
3. Grep the yml file locally for a class or method instead of refetching per lookup. Don't read the whole file.
|
|
106
|
+
|
|
107
|
+
Always use the docs matching the project's Unity version and installed package version rather than relying on training knowledge, because APIs are often marked obsolete between versions and a member you recall might be obsolete or removed in the project's version.
|
|
108
|
+
|
|
109
|
+
## Worked examples
|
|
110
|
+
|
|
111
|
+
Prefer in order: the C# example on the type or member page you are using; existing project scripts (match their style); the sample project at `https://github.com/Unity-Technologies/PhysicsExamples2D`. Check all three before inventing a pattern.
|
|
112
|
+
|
|
113
|
+
## Final step
|
|
114
|
+
|
|
115
|
+
Physics changes alter runtime behaviour, so a clean compile isn't enough. Run these checks in order. If any check fails, reread the [docs pages](#full-topic-map) to find out what you missed, fix it, and run the checks again.
|
|
116
|
+
|
|
117
|
+
1. Use `console_status` to check the project has zero console errors.
|
|
118
|
+
2. Read back what you changed, because a change can compile cleanly and still do nothing:
|
|
119
|
+
- For components you added or configured in the scene, use `script eval` to check each one exists on its GameObject and its properties hold the values you set, such as a Collider 2D's `isTrigger` or the members listed on a Core component's type page.
|
|
120
|
+
- For a script, read it back and check it uses the system and namespace from [Step 0](#step-0-which-physics-system), and sets each Core body's `type` explicitly.
|
|
121
|
+
3. Add temporary `Debug.Log` lines that print the behaviour you changed, such as a body's position or velocity, or a contact or trigger callback firing.
|
|
122
|
+
4. Enter Play mode and check the console shows the expected log lines and still has zero errors. You can also read the world through `script eval`. Take no screenshots, because they take too much time.
|
|
123
|
+
5. Exit Play mode, remove the temporary `Debug.Log` lines, and check the console again has zero errors.
|
|
124
|
+
|
|
125
|
+
## Final report
|
|
126
|
+
|
|
127
|
+
Short checklist: what you changed and why, which physics system you used, anything left for the user to decide or do.
|
|
128
|
+
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
# 2D Physics Core
|
|
2
|
+
|
|
3
|
+
## Contents
|
|
4
|
+
|
|
5
|
+
- [Step 0](#step-0) — when to read before acting
|
|
6
|
+
- [Configuring a component](#configuring-a-component)
|
|
7
|
+
- [Creating in script](#creating-in-script)
|
|
8
|
+
- [Ownership](#ownership)
|
|
9
|
+
- [What you are likely to get wrong](#what-you-are-likely-to-get-wrong)
|
|
10
|
+
- [Manual: 2D Physics Core](#manual-2d-physics-core)
|
|
11
|
+
- [Scripting reference](#scripting-reference)
|
|
12
|
+
- [Package documentation](#package-documentation)
|
|
13
|
+
|
|
14
|
+
The engine API is a built-in module — no package needed. The Physics Pose, Area and Constraint **components** come from `com.unity.2d.physics`, requiring 6000.7+. Check `Packages/manifest.json` before suggesting a component; if absent, offer to add it using the `unity-package-management` skill.
|
|
15
|
+
|
|
16
|
+
A component is not the physics object. It owns a body, shape or joint — operate on that owned object. Read/write it, apply forces, query it, handle contacts (from a worker thread if needed). See [Physics Pose and Physics Area components](https://docs.unity.com/en-us/engine/<VERSION>/manual/unity2d/2d-physics-api/create-objects/pose-and-area.md).
|
|
17
|
+
|
|
18
|
+
The components use only the public API, by design, so nothing is component-only — a plain MonoBehaviour driving the engine API always works. Never say a case is unsupported. For many shapes or nested areas, Physics Area Composite already exists.
|
|
19
|
+
|
|
20
|
+
Within Core: components for scene-authored objects, script for bulk runtime creation. The modules `com.unity.modules.physics2d` and `com.unity.modules.physicscore2d` are on by default; only matter if stripped. The Unity version sets the namespace, not which system exists. Read the [Unity 6.5 upgrade guide](https://docs.unity.com/en-us/engine/<VERSION>/manual/upgrade-guides/upgrade-guide-unity65.md) (local: `en/Manual/UpgradeGuideUnity65.html`) for the rename.
|
|
21
|
+
|
|
22
|
+
## Step 0
|
|
23
|
+
|
|
24
|
+
Before you go forward with a workflow or diagnosis:
|
|
25
|
+
|
|
26
|
+
1. Open and read the documentation page(s) from the [Manual](#manual-2d-physics-core) or [Scripting reference](#scripting-reference) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
|
|
27
|
+
2. Name the file(s) you read in your response.
|
|
28
|
+
|
|
29
|
+
This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.
|
|
30
|
+
|
|
31
|
+
Always use versioned URLs — unversioned links resolve to the current release, not the project's version.
|
|
32
|
+
|
|
33
|
+
Core script type pages are an exception: the API only changed namespace, so the version only decides whether to write `Unity.U2D.Physics` or `UnityEngine.LowLevelPhysics2D`. Use the project's version when known, otherwise 6000.7.
|
|
34
|
+
|
|
35
|
+
Most tasks (apply force or impulse, move a body, read velocity, add a component) need no reading — just do it.
|
|
36
|
+
|
|
37
|
+
Exceptions that always require reading first:
|
|
38
|
+
- **Setting component values**: fetch the type page per [Configuring a component](#configuring-a-component).
|
|
39
|
+
- **Creating a body in script**: read the two pages in [Creating in script](#creating-in-script).
|
|
40
|
+
- **Any member you cannot name with confidence**: read one page. Never read more than two pages for a single task.
|
|
41
|
+
|
|
42
|
+
## Configuring a component
|
|
43
|
+
|
|
44
|
+
Follow these rules for configuring a component:
|
|
45
|
+
|
|
46
|
+
- Never write serialized fields — the serialized names differ from public names. Drive everything through public properties and methods via `script eval`.
|
|
47
|
+
- Definition and geometry are separate: a pose's body settings live in its definition; an area's shape is its geometry. Configure them independently. A change to either needs its apply call before it takes effect — the type page states which one.
|
|
48
|
+
- Before configuring any component, fetch its API page and use only members it lists. Read the installed version from `Packages/packages-lock.json` (major.minor, e.g. `1.1`), then fetch:
|
|
49
|
+
`https://docs.unity3d.com/Packages/com.unity.2d.physics@<version>/api/Unity.U2D.Physics.<Type>.html`
|
|
50
|
+
|
|
51
|
+
One page per type covers all members. If a member is missing, treat it as undocumented, not absent.
|
|
52
|
+
|
|
53
|
+
## Creating in script
|
|
54
|
+
|
|
55
|
+
Before creating a Core body in script, read these two pages and follow their examples. Set `type` on the definition explicitly.
|
|
56
|
+
|
|
57
|
+
- `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsbodydefinition.md`
|
|
58
|
+
- `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsbody.md`
|
|
59
|
+
|
|
60
|
+
Use the project's version, or 6000.7 if unknown. On 6000.3–6000.4 the namespace is `UnityEngine.LowLevelPhysics2D`, e.g. `.../script-reference/unityengine/lowlevelphysics2d/physicsbody.md`.
|
|
61
|
+
|
|
62
|
+
Script types — joints, geometry, queries, and everything else — are engine types in the main scripting reference only. Never look for them in the `com.unity.2d.physics` package docs.
|
|
63
|
+
|
|
64
|
+
## Ownership
|
|
65
|
+
|
|
66
|
+
Core only. Before you destroy or change a world, body, shape, chain or joint you didn't create in this task, read the owner rules on these pages and on the member page you're calling, such as [PhysicsBody.Destroy](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsbody/destroy.md):
|
|
67
|
+
|
|
68
|
+
- [PhysicsBody.SetOwner](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsbody/setowner.md)
|
|
69
|
+
- [PhysicsWorld.CreateOwnerKey](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsworld/createownerkey.md)
|
|
70
|
+
|
|
71
|
+
Follow these rules:
|
|
72
|
+
|
|
73
|
+
- Create an owner key and own what you create, so later calls can tell your objects from the user's.
|
|
74
|
+
- Never destroy an object you only found through a query, because it belongs to the user's code or a component.
|
|
75
|
+
- To remove a component-created object, remove its component instead.
|
|
76
|
+
- After an owner-gated call, check the console for warnings, because a refused call doesn't throw.
|
|
77
|
+
|
|
78
|
+
## What you are likely to get wrong
|
|
79
|
+
|
|
80
|
+
Core's API is young and was renamed, so your recall is unreliable. Nothing carries over between systems unverified. Where a row links a page, read it instead of relying on recall.
|
|
81
|
+
|
|
82
|
+
| Your likely assumption | What to do instead |
|
|
83
|
+
| --- | --- |
|
|
84
|
+
| Legacy manual pages are flat, like `class-Rigidbody2D.html` | Build URLs from the folder paths in the Legacy 2D physics reference |
|
|
85
|
+
| Your recalled Core namespace is right for the project | Check the project's Unity version, then read the [Unity 6.5 upgrade guide](https://docs.unity.com/en-us/engine/<VERSION>/manual/upgrade-guides/upgrade-guide-unity65.md) |
|
|
86
|
+
| Box2D v2 naming and semantics apply to Core | Ignore older forum answers. Read the Core type page |
|
|
87
|
+
| A property uses the unit Box2D or the other system uses | Read the property page for its unit and range |
|
|
88
|
+
| Core layer masks are the same width as a `LayerMask` | Read [PhysicsMask](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsmask.md) |
|
|
89
|
+
| Some behaviour is component-only | None is. Drive the engine API from a MonoBehaviour |
|
|
90
|
+
| A user's own component needs wiring to work with Unity's | None. All interaction is engine-side |
|
|
91
|
+
| Any handle can be destroyed | Only what you own. Follow [Ownership](#ownership) |
|
|
92
|
+
| You must create a world first | Read [PhysicsWorld.defaultWorld](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsworld/defaultworld.md) |
|
|
93
|
+
| Debug visuals need gizmos or `Debug.DrawLine` | Use the Core physics renderer from [Scripting reference](#scripting-reference). Never hand-roll it |
|
|
94
|
+
| A method exists because the other system has one like it | Confirm on its own page |
|
|
95
|
+
| A recalled member such as `bodyType` still sets body type | Read [PhysicsBody.type](https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/u2d/physics/physicsbody/type.md) |
|
|
96
|
+
| A newly created body has a known default type | Don't assume. Set `.type` explicitly: falls, thrown or bounces → Dynamic. Ground, wall or anchor → Static |
|
|
97
|
+
| "add a circle/capsule/polygon/segment area" means the dedicated component | Could be that or Primitive with `shapeType` — same shape, two routes. Prefer dedicated when fixed at authoring time; Primitive only if it must switch at runtime. Chain Segment has no dedicated component |
|
|
98
|
+
|
|
99
|
+
## Manual: 2D Physics Core
|
|
100
|
+
|
|
101
|
+
If the Editor install folder has a `Data/Documentation` folder (eg `...Unity/Hub/Editor/6000.6.0b2/Editor/Data/Documentation`), read the html files from the `en/Manual/2d-physics-api/` folder. Local file names are flat: `2d-physics-api-<last path segment>.html` (e.g. `create-objects/reference-body.md` => `2d-physics-api-reference-body.html`), and section pages end `-landing` (e.g. `connect-objects.md` => `2d-physics-api-connect-objects-landing.html`). Start at `2d-physics-api-landing.html` and follow its links if a name doesn't match.
|
|
102
|
+
|
|
103
|
+
Otherwise use the online pages.
|
|
104
|
+
|
|
105
|
+
Base: `https://docs.unity.com/en-us/engine/<VERSION>/manual/unity2d/2d-physics-api/`. Pages are `.md`. The landing page is `https://docs.unity.com/en-us/engine/<VERSION>/manual/unity2d/2d-physics-api.md` — contents.
|
|
106
|
+
|
|
107
|
+
Paths below are relative to the base:
|
|
108
|
+
- `introduction.md` — what it is, component-to-object mapping
|
|
109
|
+
- `get-started.md` — first scene with components
|
|
110
|
+
- `create-objects.md` — Physics Pose and Physics Area components. Children in `create-objects/`: `pose-and-area.md`, `physics-object.md`, `add-sprite.md`, `debug-drawing.md` (Scene view editing, rendering modes)
|
|
111
|
+
- `connect-objects.md` — joints. Children in `connect-objects/`: `joints.md`, `create-constraint.md`, `constraint-events.md`
|
|
112
|
+
- `properties.md` — definitions, pinned properties, custom data, global settings. Children in `properties/`: `definitions.md`, `pin-properties.md`, `custom-data.md`, `class-physics-core-settings2d.md`, `preferences-window-reference.md`
|
|
113
|
+
- `interactions.md` — collisions, contacts, triggers, filtering (queries are `PhysicsWorld` cast/overlap methods in the scripting reference). Children in `interactions/`: `introduction.md`, `collisions-enable.md`, `collision-handle.md`
|
|
114
|
+
|
|
115
|
+
Read in full before acting (outside this skill's scope): `worlds.md`, `3d-planes.md`, `multithreading.md`.
|
|
116
|
+
|
|
117
|
+
Component reference pages follow a pattern — build them:
|
|
118
|
+
- Body: `create-objects/reference-body.md`
|
|
119
|
+
- Area: `create-objects/reference-area-<kind>.md` (capsule, circle, composite, contour, path, polygon, primitive, segment, sprite)
|
|
120
|
+
- Joint: `connect-objects/reference-joint-<kind>.md` (distance, fixed, hinge, relative, slider, wheel)
|
|
121
|
+
- Constraint: `connect-objects/reference-constraint-ignore.md`
|
|
122
|
+
- Simulation: `worlds/reference-simulation-component.md`
|
|
123
|
+
- Assets: `worlds/reference-world.md` (Physics Simulation Definition), `worlds/reference-simulation-asset.md` (Physics Simulation World)
|
|
124
|
+
|
|
125
|
+
This manual covers components. For joint structs, definitions, geometry, queries, math, events and destruction — use the scripting reference.
|
|
126
|
+
|
|
127
|
+
## Scripting reference
|
|
128
|
+
|
|
129
|
+
Build the URL — do not search for member pages. Names are lowercase.
|
|
130
|
+
|
|
131
|
+
Base: `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/`
|
|
132
|
+
|
|
133
|
+
| You want | Pattern | Example |
|
|
134
|
+
| --- | --- | --- |
|
|
135
|
+
| Legacy type in `UnityEngine` | `unityengine/<type>.md` | `unityengine/rigidbody2d.md` |
|
|
136
|
+
| Core namespace (lists types) | `unity/u2d/physics.md` | |
|
|
137
|
+
| Core type | `unity/u2d/physics/<type>.md` | `unity/u2d/physics/physicsbody.md` |
|
|
138
|
+
| Core type, 6000.3–6000.4 | `unityengine/lowlevelphysics2d/<type>.md` | `unityengine/lowlevelphysics2d/physicsbody.md` |
|
|
139
|
+
| Method, property, field or nested type | `<type page without .md>/<member>.md` | `unity/u2d/physics/physicsbody/createshape.md`, `unity/u2d/physics/physicsbody/linearvelocity.md` |
|
|
140
|
+
| A joint in script | Start at `unity/u2d/physics/physicsjoint.md`, then `physics<kind>joint` and `physics<kind>jointdefinition` | `unity/u2d/physics/physicshingejoint.md` |
|
|
141
|
+
|
|
142
|
+
A type page lists members; a method page lists every overload. Units, ranges and defaults are on property pages. A 404 means the name is wrong, or that version's docs aren't published — fetch the type page and read its members, or try an adjacent version.
|
|
143
|
+
|
|
144
|
+
For the Core renderer: start at `unity/u2d/physics/physicsworld/renderingmode.md`, `unity/u2d/physics/physicscoresettings2d.md`, and `physicsworld` draw methods: `drawgeometry`, `drawshapeproxy`, `drawqueryresult`, `drawlinestrip`, `drawshapes`.
|
|
145
|
+
|
|
146
|
+
## Package documentation
|
|
147
|
+
|
|
148
|
+
Package API pages are live only — not local files. Fetch using the version from `Packages/packages-lock.json`:
|
|
149
|
+
`https://docs.unity3d.com/Packages/com.unity.2d.physics@<major.minor>/api/Unity.U2D.Physics.<Type>.html`
|
|
150
|
+
|
|
151
|
+
The package manual pages are local markdown conversions of the Unity Manual, stored at `<project-folder>/Library/PackageCache/com.unity.2d.physics@*/`. Read only the .md files in that specific `PackageCache` subfolder. You must not look at non-.md files, or look outside at other Library or PackageCache folders, otherwise it takes too much time. Start with `Documentation~/TableOfContents.md`, or list the `Documentation~/` `.md` files if there is none, to find the page you need.
|
|
152
|
+
|
|
153
|
+
If that folder has no `.md` files, use the online pages at `https://docs.unity3d.com/Packages/com.unity.2d.physics@<VERSION>/manual/`, because some package versions don't ship their docs.
|
|
154
|
+
|
|
155
|
+
The `api/index.html` listing fetches as nothing — go straight to a named type page.
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
# Legacy 2D physics
|
|
2
|
+
|
|
3
|
+
Relative paths in this file resolve to the skill directory.
|
|
4
|
+
|
|
5
|
+
## Step 0
|
|
6
|
+
|
|
7
|
+
Before you go forward with a workflow or diagnosis:
|
|
8
|
+
|
|
9
|
+
1. Open and read the [documentation page(s)](#manual-legacy-2d-physics) that cover the specific subject related to what you intend to do or fix and check if you've missed anything.
|
|
10
|
+
2. Name the file(s) you read in your response.
|
|
11
|
+
|
|
12
|
+
This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong Unity version.
|
|
13
|
+
|
|
14
|
+
## Manual: legacy 2D physics
|
|
15
|
+
|
|
16
|
+
If the Editor install folder has a `Data/Documentation` folder (eg `...Unity/Hub/Editor/6000.6.0b2/Editor/Data/Documentation`), read the html files from the `en/Manual` folder. Start at `en/Manual/2d-physics/2d-physics.html` and follow its links, because local file names differ from the online paths (e.g. `2d-physics/rigidbody/rigidbody-2d-landing.html`).
|
|
17
|
+
|
|
18
|
+
Otherwise use the online pages.
|
|
19
|
+
|
|
20
|
+
Base: `https://docs.unity.com/en-us/engine/<VERSION>/manual/unity2d/`. Pages are `.md`.
|
|
21
|
+
|
|
22
|
+
Pages, relative to the base:
|
|
23
|
+
|
|
24
|
+
- `2d-physics.md` — contents page for legacy 2D physics
|
|
25
|
+
- `2d-physics/rigidbody-2d.md` — Rigidbody 2D: body types, simulation and movement
|
|
26
|
+
- `2d-physics/collider-2d.md` — Collider 2D types and their shared properties
|
|
27
|
+
- `2d-physics/effectors-2d.md` — Effector 2D components, such as area, buoyancy and platform effectors
|
|
28
|
+
- `2d-physics/2d-joints.md` — Joint 2D components that connect bodies
|
|
29
|
+
- `2d-physics/physics-2d-profiler.md` — profiling the 2D physics simulation
|
|
30
|
+
- `2d-physics/constant-force-2d-reference.md` — Constant Force 2D component (single page, no children)
|
|
31
|
+
- `2d-physics/physics-material-2d-reference.md` — Physics Material 2D asset (single page, no children)
|
|
32
|
+
|
|
33
|
+
Each landing page has a folder of the same name listing its children — follow those rather than guessing leaf names.
|
|
34
|
+
|
|
35
|
+
## Scripting reference
|
|
36
|
+
|
|
37
|
+
Legacy types live in the main scripting reference as `unityengine/<type>.md`, e.g. `https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unityengine/rigidbody2d.md`. See the Scripting reference table in `references/2d-physics-core.md` for the full URL pattern, including how it differs from Core types.
|
|
38
|
+
|
|
39
|
+
## What you are likely to get wrong
|
|
40
|
+
|
|
41
|
+
| Your likely assumption | Actually |
|
|
42
|
+
| --- | --- |
|
|
43
|
+
| Your recall of legacy manual URLs is current | Build URLs from the [Manual](#manual-legacy-2d-physics) list, because the pages moved |
|
|
44
|
+
| Legacy manual pages are flat, like `class-Rigidbody2D.html` | Use the family folders, such as `2d-physics/rigidbody-2d/` and `2d-physics/collider-2d/` |
|
|
45
|
+
| A Core type or member has a legacy equivalent | Confirm on the legacy type's own page |
|