@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,162 @@
|
|
|
1
|
+
## What this skill does and does not automate
|
|
2
|
+
|
|
3
|
+
Every `AudioMixer` in the Editor is really an `AudioMixerController`, and every `AudioMixerGroup` is
|
|
4
|
+
an `AudioMixerGroupController`. Those two controller types are **not public**, and the authoring
|
|
5
|
+
calls — creating a mixer, creating a group, re-parenting a group, changing a group's volume — exist
|
|
6
|
+
only on them.
|
|
7
|
+
|
|
8
|
+
This skill deliberately does not use them. Unity makes no stability commitment for non-public API,
|
|
9
|
+
so a skill built on one can break silently between versions: the call fails at runtime rather than
|
|
10
|
+
at compile time, and the user cannot tell that from a Unity bug.
|
|
11
|
+
|
|
12
|
+
What matters is that the split is favorable. Each of those controllers derives from a public runtime
|
|
13
|
+
type — `UnityEngine.Audio.AudioMixer` and `UnityEngine.Audio.AudioMixerGroup` respectively — and
|
|
14
|
+
that public base is what every read and write below goes through. So **everything this skill needs
|
|
15
|
+
in order to inspect a mixer and route audio into it is public API**:
|
|
16
|
+
|
|
17
|
+
| Operation | Route |
|
|
18
|
+
|---|---|
|
|
19
|
+
| Find the project's mixers | public — `AssetDatabase` + `UnityEngine.Audio.AudioMixer` |
|
|
20
|
+
| List a mixer's groups | public — `AudioMixer.FindMatchingGroups` |
|
|
21
|
+
| Read an Audio Source's current group | public — `AudioSource.outputAudioMixerGroup` |
|
|
22
|
+
| Assign a group to an Audio Source | public — `AudioSource.outputAudioMixerGroup` |
|
|
23
|
+
| **Create a mixer or a group, change a group volume** | **not available** — the user does this in the Audio Mixer window |
|
|
24
|
+
|
|
25
|
+
So the division of labor is: the skill inventories what exists, proposes the routing, asks the user
|
|
26
|
+
to add any missing groups (two clicks in a window they already have open), and then does all the
|
|
27
|
+
routing itself. The tedious part — walking dozens of Audio Sources and classifying them — is the
|
|
28
|
+
part that was worth automating anyway.
|
|
29
|
+
|
|
30
|
+
All snippets below are written for `unity command script eval --caller plugin --skill audio-setup-mixers --code '<snippet>'`: fully qualified, no
|
|
31
|
+
`using` directives, returning their result rather than logging it.
|
|
32
|
+
|
|
33
|
+
## Inventory the project's mixers and their groups
|
|
34
|
+
|
|
35
|
+
```csharp
|
|
36
|
+
// Scope the search to Assets. Unscoped, FindAssets also walks read-only packages, so the
|
|
37
|
+
// inventory fills up with mixers the user did not author and cannot edit. Measured on one
|
|
38
|
+
// project: t:Material returned 81 unscoped against 9 under Assets, t:Shader 204 against 22.
|
|
39
|
+
// The only overloads are (string) and (string, string[] searchInFolders) — there is no
|
|
40
|
+
// SearchMode parameter.
|
|
41
|
+
var guids = UnityEditor.AssetDatabase.FindAssets("t:AudioMixer", new[] { "Assets" });
|
|
42
|
+
if (guids.Length == 0) { return "no AudioMixer assets under Assets/"; }
|
|
43
|
+
|
|
44
|
+
var rows = new System.Collections.Generic.List<string>();
|
|
45
|
+
foreach (var guid in guids)
|
|
46
|
+
{
|
|
47
|
+
var path = UnityEditor.AssetDatabase.GUIDToAssetPath(guid);
|
|
48
|
+
var mixer = UnityEditor.AssetDatabase.LoadAssetAtPath<UnityEngine.Audio.AudioMixer>(path);
|
|
49
|
+
var groups = mixer.FindMatchingGroups("");
|
|
50
|
+
var names = System.Linq.Enumerable.Select(groups, g => g.name);
|
|
51
|
+
rows.Add($"{path} ({groups.Length} groups): {string.Join(", ", names)}");
|
|
52
|
+
}
|
|
53
|
+
return string.Join("\n", rows);
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
`FindMatchingGroups("")` returns every group in the mixer as the public `AudioMixerGroup` type,
|
|
57
|
+
which is what routing needs. It returns a flat list — it does not describe the parent/child shape.
|
|
58
|
+
If the hierarchy matters, read it off the Audio Mixer window with the user rather than reaching for
|
|
59
|
+
the non-public tree API.
|
|
60
|
+
|
|
61
|
+
## Read what the scene's Audio Sources are currently routed to
|
|
62
|
+
|
|
63
|
+
```csharp
|
|
64
|
+
var sources = UnityEngine.Object.FindObjectsByType<UnityEngine.AudioSource>(
|
|
65
|
+
UnityEngine.FindObjectsInactive.Include, UnityEngine.FindObjectsSortMode.None);
|
|
66
|
+
|
|
67
|
+
var rows = new System.Collections.Generic.List<string>();
|
|
68
|
+
foreach (var source in sources)
|
|
69
|
+
{
|
|
70
|
+
var group = source.outputAudioMixerGroup;
|
|
71
|
+
rows.Add($"{source.gameObject.name}: clip={(source.clip != null ? source.clip.name : "<none>")}, "
|
|
72
|
+
+ $"group={(group != null ? group.name : "<none — routes to Master>")}");
|
|
73
|
+
}
|
|
74
|
+
return rows.Count == 0 ? "no Audio Sources in the open scene" : string.Join("\n", rows);
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Inactive objects are included on purpose: a disabled Audio Source still ships with the scene and
|
|
78
|
+
still needs routing.
|
|
79
|
+
|
|
80
|
+
## Assign groups to Audio Sources
|
|
81
|
+
|
|
82
|
+
This is the one write this skill performs. `AudioSource.outputAudioMixerGroup` is typed as the
|
|
83
|
+
public `AudioMixerGroup`, and the objects returned by `FindMatchingGroups` are assignable to it, so
|
|
84
|
+
there is no cast and no reflection.
|
|
85
|
+
|
|
86
|
+
**Key the mapping on whichever identifier you actually classified by.** Step 2 classifies from the
|
|
87
|
+
**clip asset name** first and falls back to the GameObject name, so the mapping has to accept either
|
|
88
|
+
— keying it on GameObject name alone silently drops every source you classified by its clip.
|
|
89
|
+
|
|
90
|
+
```csharp
|
|
91
|
+
var mixer = UnityEditor.AssetDatabase.LoadAssetAtPath<UnityEngine.Audio.AudioMixer>(
|
|
92
|
+
"Assets/Audio/TheMixer.mixer");
|
|
93
|
+
|
|
94
|
+
// Keys may be a clip asset name or a GameObject name — whichever you classified from.
|
|
95
|
+
var assignments = new System.Collections.Generic.Dictionary<string, string> {
|
|
96
|
+
{ "FootStep4_Sound", "Foley" }, // clip name
|
|
97
|
+
{ "MenuMusic", "Music" }, // GameObject name
|
|
98
|
+
};
|
|
99
|
+
|
|
100
|
+
var sources = UnityEngine.Object.FindObjectsByType<UnityEngine.AudioSource>(
|
|
101
|
+
UnityEngine.FindObjectsInactive.Include, UnityEngine.FindObjectsSortMode.None);
|
|
102
|
+
|
|
103
|
+
var done = new System.Collections.Generic.List<string>();
|
|
104
|
+
var noSuchGroup = new System.Collections.Generic.List<string>();
|
|
105
|
+
var unassigned = new System.Collections.Generic.List<string>();
|
|
106
|
+
|
|
107
|
+
UnityEditor.Undo.IncrementCurrentGroup();
|
|
108
|
+
UnityEditor.Undo.SetCurrentGroupName("Route Audio Sources to mixer groups");
|
|
109
|
+
|
|
110
|
+
foreach (var source in sources)
|
|
111
|
+
{
|
|
112
|
+
var clipName = source.clip != null ? source.clip.name : null;
|
|
113
|
+
string wanted = null;
|
|
114
|
+
if (clipName != null) { assignments.TryGetValue(clipName, out wanted); }
|
|
115
|
+
if (wanted == null) { assignments.TryGetValue(source.gameObject.name, out wanted); }
|
|
116
|
+
|
|
117
|
+
if (wanted == null)
|
|
118
|
+
{
|
|
119
|
+
// Never skip silently — an unmatched source is a result the user has to see.
|
|
120
|
+
unassigned.Add($"{source.gameObject.name} (clip={clipName ?? "<none>"})");
|
|
121
|
+
continue;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
var group = System.Array.Find(mixer.FindMatchingGroups(""), g => g.name == wanted);
|
|
125
|
+
if (group == null) { noSuchGroup.Add($"{source.gameObject.name} -> {wanted}"); continue; }
|
|
126
|
+
|
|
127
|
+
UnityEditor.Undo.RegisterCompleteObjectUndo(source, "Route Audio Source");
|
|
128
|
+
source.outputAudioMixerGroup = group;
|
|
129
|
+
UnityEditor.EditorUtility.SetDirty(source);
|
|
130
|
+
done.Add($"{source.gameObject.name} -> {group.name}");
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
UnityEditor.Undo.FlushUndoRecordObjects();
|
|
134
|
+
UnityEditor.Undo.CollapseUndoOperations(UnityEditor.Undo.GetCurrentGroup());
|
|
135
|
+
|
|
136
|
+
var report = $"routed {done.Count}: {string.Join(", ", done)}";
|
|
137
|
+
if (noSuchGroup.Count > 0) { report += $"\nNO SUCH GROUP (create it first): {string.Join(", ", noSuchGroup)}"; }
|
|
138
|
+
if (unassigned.Count > 0) { report += $"\nNOT IN THE MAPPING (unrouted): {string.Join(", ", unassigned)}"; }
|
|
139
|
+
return report;
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
Three things to carry through to the user:
|
|
143
|
+
|
|
144
|
+
- **The scene changed, not the mixer asset.** `outputAudioMixerGroup` lives on the Audio Source, so
|
|
145
|
+
the routing only persists once the scene is saved
|
|
146
|
+
(`UnityEditor.SceneManagement.EditorSceneManager.SaveOpenScenes()`). Say so rather than assuming.
|
|
147
|
+
- **Report the `NO SUCH GROUP` list explicitly.** A group the user hasn't created yet is the normal
|
|
148
|
+
case in this flow, not an error to swallow. Show it and ask them to add those groups.
|
|
149
|
+
- **Report `NOT IN THE MAPPING` too.** Those are sources your classification missed. Reporting
|
|
150
|
+
"routed 4" while three sources were quietly skipped is the worst outcome available here, because it
|
|
151
|
+
reads as success.
|
|
152
|
+
|
|
153
|
+
## Asking the user to add a group
|
|
154
|
+
|
|
155
|
+
There is no supported programmatic route, so hand over precisely rather than vaguely:
|
|
156
|
+
|
|
157
|
+
> In the Audio Mixer window (Window → Audio → Audio Mixer), select **TheMixer**, then click the
|
|
158
|
+
> **+** next to Groups and name the new group **SFX**. Drag it under Master if it isn't already.
|
|
159
|
+
> Tell me when it's there and I'll route the sources.
|
|
160
|
+
|
|
161
|
+
Then re-run the inventory snippet to confirm the group exists before routing — don't assume the
|
|
162
|
+
user did it, and don't assume they spelled it the way you asked.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
# Security notes: build-gtk
|
|
2
|
+
|
|
3
|
+
This skill has the agent read state from the user's open Unity Editor through `unity command script eval` when it checks a suspected fault in Play mode. 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. The skill uses it only to read state while chasing a suspected fault, and uses `unity command console status` for the console check. |
|
|
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 itself to read Editor state. Nothing downloaded from outside is executed.
|
|
16
|
+
- **Read only, once.** The skill enters Play mode at most once, to chase a fault it already suspects, and reads state instead of adding logging to the user's scripts.
|
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: build-gtk
|
|
3
|
+
description: >-
|
|
4
|
+
Builds graph tools with Unity Graph Toolkit (GTK) on 6.6+, state machines on 6.7+, and importers for
|
|
5
|
+
runtime assets. Use this skill for graph, node or state machine editors, or GraphView migrations. Not
|
|
6
|
+
for Shader Graph, VFX Graph or Animator.
|
|
7
|
+
required_editor_version: ">=6000.6"
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Unity Graph Toolkit (GTK)
|
|
11
|
+
|
|
12
|
+
Build Editor graph tools and state machine tools on Unity's Graph Toolkit module, using only its
|
|
13
|
+
public API in the `Unity.GraphToolkit.Editor` namespace.
|
|
14
|
+
|
|
15
|
+
## Important
|
|
16
|
+
|
|
17
|
+
- Use the unity cli (`unity command --format json`) and the `unity-cli` and `unity-pipeline` skills for
|
|
18
|
+
each step.
|
|
19
|
+
- Create a restore point you can roll back to if your changes fail.
|
|
20
|
+
- Do only what's asked. Don't change unrelated assets or files.
|
|
21
|
+
- Never leave verification code in the user's script. Never build logging or detection they didn't ask
|
|
22
|
+
for. See [Final step](#final-step).
|
|
23
|
+
- Avoid long explanations.
|
|
24
|
+
- **Graph Toolkit is a built-in module, not a package.** Never add `com.unity.graphtoolkit` to the
|
|
25
|
+
manifest; it is a deprecated shim. Editor code needs no asmdef reference to use it.
|
|
26
|
+
- **Use only the public API.** If a draft uses any name from the left column, stop and rewrite it with
|
|
27
|
+
the right column:
|
|
28
|
+
|
|
29
|
+
| Never write | Write instead |
|
|
30
|
+
|---|---|
|
|
31
|
+
| `GraphModel`, `GraphObject`, `GraphTool`, `Stencil`, `BaseGraphTool` | `Graph` and `GraphDatabase` |
|
|
32
|
+
| `NodeModel`, `PortModel`, `WireModel` | `Node`, `IPort`, `Wire` |
|
|
33
|
+
| `StateModel`, `TransitionModel`, `ConditionModel` | `State`, `ITransition`, `Condition<T>` |
|
|
34
|
+
| `GraphViewEditorWindow`, `GraphElementsExtensionMethodsCache`, `ModelView` | the window is provided; `NodeView<T>` on 6000.7+ for custom UI |
|
|
35
|
+
| `UnityEditor.Experimental.GraphView`, `graphViewChanged`, `Port.Create` | model the tool as `Graph` and `Node` classes; track changes in `OnGraphChanged` |
|
|
36
|
+
| `com.unity.graphtoolkit` in the manifest | nothing; the module is built in |
|
|
37
|
+
|
|
38
|
+
- **Spell members exactly.** Properties are PascalCase (`FirstConnectedPort`, `IsConnected`),
|
|
39
|
+
attributes take positional arguments, and IDs are `Hash128`, not strings. Look up any member you
|
|
40
|
+
have not seen in the docs or references instead of guessing it.
|
|
41
|
+
- **Every authoring class is `[Serializable]`** (graph, node, state, condition, self transition) and
|
|
42
|
+
lives in Editor-only code. Otherwise nodes reset or vanish after a domain reload.
|
|
43
|
+
- **Keep runtime assemblies free of `Unity.GraphToolkit.Editor`.** Guard visualization calls with
|
|
44
|
+
`#if UNITY_EDITOR`, because the module is Editor-only and any reference to it breaks the player build.
|
|
45
|
+
- **Use `LoadGraphForImporter` (not `LoadGraph`) inside a `ScriptedImporter`.** The state machine
|
|
46
|
+
equivalent is `StateMachineDatabase.LoadStateMachineForImporter<T>`.
|
|
47
|
+
- **Wrap every programmatic edit** in `UndoBeginRecordGraph` / `UndoEndRecordGraph` and call
|
|
48
|
+
`GraphDatabase.SaveGraph`. Never mutate the graph inside `OnEnable`, `OnDisable` or `OnGraphChanged`;
|
|
49
|
+
it throws `InvalidOperationException`.
|
|
50
|
+
|
|
51
|
+
## Step 1
|
|
52
|
+
|
|
53
|
+
Before you go forward with a workflow or diagnosis:
|
|
54
|
+
|
|
55
|
+
1. Get the Editor version from the user's message, or else from `m_EditorVersion` in
|
|
56
|
+
`ProjectSettings/ProjectVersion.txt`, and pick the API from the table below. A version the user
|
|
57
|
+
names wins over a newer project. Ask only when neither gives it.
|
|
58
|
+
2. Open and read the [documentation page(s)](#topic-map) that cover what you intend to do or fix. Where
|
|
59
|
+
the manual has no page, read the reference file named in [Step 3](#step-3-where-the-docs-stop).
|
|
60
|
+
3. Name the file(s) you read in your response.
|
|
61
|
+
|
|
62
|
+
A missing Unity project or unreachable docs do not block the answer: write the code from this skill
|
|
63
|
+
and its references, say where each file goes, and name what you could not check.
|
|
64
|
+
|
|
65
|
+
This is because your training knowledge about Unity might be out of date, incorrect, or for the wrong
|
|
66
|
+
Unity version. Graph Toolkit changed significantly between 6000.4, 6000.6 and 6000.7.
|
|
67
|
+
|
|
68
|
+
| Editor version | Available |
|
|
69
|
+
|---|---|
|
|
70
|
+
| Older than 6000.4 | Only the retired experimental package (0.x). Its API differs from this skill. Recommend upgrading. |
|
|
71
|
+
| 6000.4 to 6000.5 | Module present, but without port capacity, type casting, wire and node visualization, USS node styling, or element IDs. |
|
|
72
|
+
| 6000.6 | The Graph API. |
|
|
73
|
+
| 6000.7 and newer | Everything above plus the State Machine API, `NodeView<T>` / `StateView<T>` / `ConditionView<T>` custom UI, `[GraphMenu]` / `[BlackboardMenu]` context menus, the `GraphLogger.GraphChanges` change delta, polymorphic and type-following ports, and Blackboard type restriction. |
|
|
74
|
+
|
|
75
|
+
If the user asks for a state machine tool on an Editor older than 6000.7, say plainly that the State
|
|
76
|
+
Machine API is not available there. Do not emulate it with the Graph API unless asked.
|
|
77
|
+
|
|
78
|
+
## Step 2: Start from the graph tool skeleton
|
|
79
|
+
|
|
80
|
+
The `implement-a-graph-tool.md` and `implement-nodes.md` pages explain this in full. When they cannot
|
|
81
|
+
be fetched, start from:
|
|
82
|
+
|
|
83
|
+
```csharp
|
|
84
|
+
[Graph(AssetExtension)] [Serializable] // GraphOptions.SupportsSubgraphs as a second argument
|
|
85
|
+
class DialogueGraph : Graph
|
|
86
|
+
{
|
|
87
|
+
public const string AssetExtension = "dialogue";
|
|
88
|
+
[MenuItem("Assets/Create/Dialogue/Dialogue Graph")]
|
|
89
|
+
static void Create() => GraphDatabase.PromptInProjectBrowserToCreateNewAsset<DialogueGraph>();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
[Serializable] [Node("Dialogue")]
|
|
93
|
+
class LineNode : Node
|
|
94
|
+
{
|
|
95
|
+
protected override void OnDefinePorts(IPortDefinitionContext context)
|
|
96
|
+
{
|
|
97
|
+
context.AddInputPort("In").Build(); // untyped: execution flow
|
|
98
|
+
context.AddInputPort<string>("Text").Build();
|
|
99
|
+
context.AddOutputPort("Next").WithCapacity(PortCapacity.Single).Build(); // outputs accept many wires by default
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
Different port types do not connect unless `Graph.IsConnectionAllowed(IPort output, IPort input)`
|
|
105
|
+
allows it; the graph only records the wire, and the importer does the conversion.
|
|
106
|
+
|
|
107
|
+
### Gotchas
|
|
108
|
+
|
|
109
|
+
| Symptom | Fix |
|
|
110
|
+
|---|---|
|
|
111
|
+
| A typed input port refuses a second wire, or an output accepts several | Typed inputs default to `PortCapacity.Single`; untyped ports and outputs to `Multi`. Set `WithCapacity` explicitly |
|
|
112
|
+
| `GetInputPortByName` or `GetNodeOptionByName` returns the wrong element or null | Port and option names are lookup keys: keep them unique, share a `const` between `OnDefineOptions` and `OnDefinePorts` |
|
|
113
|
+
| Ports rebuild on every keystroke of a count option | `.Delayed()` on the option |
|
|
114
|
+
| `AsVertical()` has no effect | Block node ports are always horizontal |
|
|
115
|
+
| A node lands in an odd Add-menu folder such as `Math/Add/Add` | The first `[Node]` argument is a folder path; the title is appended to it |
|
|
116
|
+
| `OnEnable` runs several times | Expected on load, reopen and domain reload: keep it idempotent |
|
|
117
|
+
| Compile error on a class marked `[SerializeReference]` | That attribute is for fields; classes take `[Serializable]` |
|
|
118
|
+
|
|
119
|
+
## Step 3: Where the docs stop
|
|
120
|
+
|
|
121
|
+
Read before writing importer, state machine or change-tracking code: these parts have no manual page, and the code shapes you need are in [where-the-docs-stop.md](references/where-the-docs-stop.md).
|
|
122
|
+
|
|
123
|
+
## Topic map
|
|
124
|
+
|
|
125
|
+
The docs are online at `https://docs.unity.com/en-us/engine/<VERSION>/`. Replace `<VERSION>` with the
|
|
126
|
+
project's Editor version from `ProjectSettings/ProjectVersion.txt`, for example `6000.6` or `6000.7`.
|
|
127
|
+
Pages are served as markdown when the `.md` suffix is kept. Prefer `WebFetch` over `WebSearch`; it is
|
|
128
|
+
faster and lands on the exact page. Only fetch what you need.
|
|
129
|
+
|
|
130
|
+
- **GTK index**: `manual/extending-the-editor/gtk-index.md`, the landing page for all GTK manual topics
|
|
131
|
+
- **Implementing a graph tool**: `manual/extending-the-editor/gtk-index/implementing-a-graph-tool.md`,
|
|
132
|
+
with these pages under it:
|
|
133
|
+
- `implement-a-graph-tool.md`: graph class, asset creation, menu item
|
|
134
|
+
- `implement-nodes.md`: node class, `OnDefinePorts`, discovery rules
|
|
135
|
+
- `implement-node-options.md`: `IOptionDefinitionContext`, `Delayed`, `ShowInInspectorOnly`
|
|
136
|
+
- `implement-context-nodes.md`: `ContextNode`, `BlockNode`, `UseWithContext`
|
|
137
|
+
- `implement-block-nodes.md`: block port rules, horizontal-only ports
|
|
138
|
+
- `type-cast-ports.md`: `IsConnectionAllowed`, cross-type connections
|
|
139
|
+
- `add-custom-toolbar-actions.md`: `GraphToolbarElement`, `IGraphWindow`
|
|
140
|
+
- `add-subgraph-support.md`: `GraphOptions.SupportsSubgraphs`, subgraph ports from Blackboard variables
|
|
141
|
+
- `graph-processing.md`: `OnGraphChanged`, `GraphLogger`, `GraphLogAction`, fix buttons
|
|
142
|
+
- **Graph window and panels**: `manual/extending-the-editor/gtk-index/landing-graph-interface.md`, with
|
|
143
|
+
`graph-window.md`, `blackboard.md`, `graph-inspector.md` and `minimap.md` under it
|
|
144
|
+
- **Debug graph view** (manual from `6000.7`; the API is the same on 6.6):
|
|
145
|
+
`manual/extending-the-editor/gtk-index/landing-implementing-debug-graph-view.md`, with
|
|
146
|
+
`concept-graph-visualization.md`, `task-display-node-progress.md`, `task-display-port-values.md`,
|
|
147
|
+
`task-display-errors-in-graph.md` and `task-customize-wire-display.md` under it
|
|
148
|
+
- **Samples**: `https://docs.unity3d.com/Packages/com.unity.graphtoolkit-samples@<PKG_VERSION>/manual/index.html`.
|
|
149
|
+
Install `com.unity.graphtoolkit-samples` by name in the Package Manager, replace `<PKG_VERSION>` with
|
|
150
|
+
the version shown there, then import Texture Maker (importer), Visual Novel Director (runtime and live
|
|
151
|
+
debug view) or Dungeon Graph Generator (building a graph from code).
|
|
152
|
+
- **Community**: `https://discussions.unity.com/tag/graph-toolkit`, for known issues and workarounds not
|
|
153
|
+
yet in the docs.
|
|
154
|
+
|
|
155
|
+
### API reference
|
|
156
|
+
|
|
157
|
+
Exact type names per API and how to build a Script Reference URL or read the local HTML copy: [api-reference.md](references/api-reference.md).
|
|
158
|
+
|
|
159
|
+
## Final step
|
|
160
|
+
|
|
161
|
+
Do the following checks:
|
|
162
|
+
|
|
163
|
+
1. Check the project has zero console errors. Use `unity command console status` for counts. Without
|
|
164
|
+
the Unity CLI, ask the user to select the Editor and report what is displayed in the Console.
|
|
165
|
+
2. Create an asset from the new menu item, add every node or state type from the Add menu, connect
|
|
166
|
+
them, save, close and reopen. The Console must show no errors or warnings. A type missing from the
|
|
167
|
+
Add menu is abstract, generic, or in another assembly without `[UseWithGraph]` /
|
|
168
|
+
`[UseWithStateMachine]`.
|
|
169
|
+
3. With an importer, confirm the produced runtime object is the main asset.
|
|
170
|
+
4. Stop there unless the user asked you to prove it works or you suspect a specific fault.
|
|
171
|
+
5. If you do enter Play mode, do it once only to chase a fault you already suspect. Read the world
|
|
172
|
+
through `unity command script eval --caller plugin --skill build-gtk --code '<snippet>'` rather than adding logging. Take no screenshots as they take too
|
|
173
|
+
much time.
|
|
174
|
+
|
|
175
|
+
If a check fails, go back and reread the [docs pages](#topic-map) or reference file for that step to
|
|
176
|
+
find out what you missed.
|
|
177
|
+
|
|
178
|
+
## Final report
|
|
179
|
+
|
|
180
|
+
Give the user a concise but not dense checklist of what you did and why. If the user needs to follow up
|
|
181
|
+
with more steps or decisions, list them. For example:
|
|
182
|
+
|
|
183
|
+
```
|
|
184
|
+
I made the following changes:
|
|
185
|
+
|
|
186
|
+
[✓] Created `Editor/DialogueGraph.cs`: the graph class registered on the `.dlg` extension.
|
|
187
|
+
[✓] Created `Editor/DialogueNode.cs`: a start node and a line node with text and next ports.
|
|
188
|
+
[✓] Created `Editor/DialogueImporter.cs`: compiles the graph into a `DialogueRuntimeGraph` asset.
|
|
189
|
+
|
|
190
|
+
To create your first graph:
|
|
191
|
+
1. Right-click in the Project window > Create > Dialogue > Dialogue Graph.
|
|
192
|
+
2. Double-click the asset to open the graph window.
|
|
193
|
+
3. Add a Start node and a Line node from the Add menu and connect them.
|
|
194
|
+
4. Save. The Inspector should show the compiled `DialogueRuntimeGraph` as the main asset.
|
|
195
|
+
|
|
196
|
+
Still to decide:
|
|
197
|
+
- More node types (choice branches, wait, end).
|
|
198
|
+
- The runtime executor (a MonoBehaviour that walks the runtime asset).
|
|
199
|
+
- A live debug view using the GraphVisualization API.
|
|
200
|
+
```
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# API reference
|
|
2
|
+
|
|
3
|
+
If the Editor install folder has a `Data/Documentation` folder (for example
|
|
4
|
+
`.../Unity/Hub/Editor/6000.6.0f1/Editor/Data/Documentation`), read the HTML files in its
|
|
5
|
+
`en/ScriptReference` folder. Otherwise the Script Reference is online:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
https://docs.unity.com/en-us/engine/<VERSION>/script-reference/unity/graphtoolkit/editor/<typename>.md
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Type names are all lowercase with generic arity dropped (`condition.md` for `Condition<T>`). Member
|
|
12
|
+
pages nest one level deeper: `.../graph/ongraphchanged.md`. The older HTML form also resolves:
|
|
13
|
+
`https://docs.unity3d.com/<VERSION>/Documentation/ScriptReference/Unity.GraphToolkit.Editor.<Type>.html`.
|
|
14
|
+
|
|
15
|
+
**Graph API (6.6+):** `Graph`, `GraphDatabase`, `GraphOptions`, `GraphLogger`, `GraphLogAction`,
|
|
16
|
+
`GraphChanges` (6.7), `ChangedNode` (6.7), `ChangeKind` (6.7), `Node`, `NodeAttribute`, `NodeView<T>` (6.7), `IPort`, `IPortDefinitionContext`,
|
|
17
|
+
`IInputPortBuilder`, `IOutputPortBuilder`, `PortCapacity`, `PortConnectorUI`, `PortDirection`,
|
|
18
|
+
`INodeOption`, `IOptionDefinitionContext`, `ContextNode`, `BlockNode`, `UseWithContext`, `UseWithGraph`,
|
|
19
|
+
`ISubgraphNode`, `Subgraph` (attribute), `IVariable`, `IVariableNode`, `VariableKind`, `IConstantNode`,
|
|
20
|
+
`IGraphWindow`, `GraphToolbarElement`, `GraphMenu` (6.7), `BlackboardMenu` (6.7), `Wire`
|
|
21
|
+
|
|
22
|
+
**State Machine API (6.7+):** `StateMachine`, `StateMachineDatabase`, `StateMachineOptions`,
|
|
23
|
+
`StateMachineLogger`, `StateMachineLogAction`, `StateMachineChanges`, `State`, `StateAttribute`,
|
|
24
|
+
`StateView<T>`, `IState`, `ITransition`, `ITransitionRule`, `ICondition`, `IGroupCondition`,
|
|
25
|
+
`GroupConditionOperation`, `IVariableCondition`,
|
|
26
|
+
`Condition`, `Condition<T>`, `ConditionAttribute`, `ConditionView<T>`, `ConditionComparison`,
|
|
27
|
+
`SelfTransition`, `TransitionAttribute`, `ISubgraphState`, `StateMachineMenu`, `ConditionMenu`,
|
|
28
|
+
`UseWithStateMachine`
|
|
29
|
+
|
|
30
|
+
**GraphVisualization API (6.6+),** namespace `Unity.GraphToolkit.Editor.GraphVisualization`, pages
|
|
31
|
+
under `.../graphvisualization/<typename>.md`: `Registry`, `Context`, `GraphMotion`, `NodeReference`,
|
|
32
|
+
`PortReference`, `WireReference`, `StateReference` (6.7), `TransitionReference` (6.7),
|
|
33
|
+
`ConditionReference` (6.7)
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Graph API parts the manual does not cover yet
|
|
2
|
+
|
|
3
|
+
The Graph Toolkit manual pages cover the 6.6 Graph API: graph and node classes, ports,
|
|
4
|
+
options, context and block nodes, subgraphs, type casting, toolbar actions and `OnGraphChanged`. This
|
|
5
|
+
file covers what they do not: the change delta, and the Unity 6000.7 additions. Members marked
|
|
6
|
+
**6.7** do not exist on 6000.6. All types live in `Unity.GraphToolkit.Editor`; confirm any member not
|
|
7
|
+
listed here in the Script Reference before using it.
|
|
8
|
+
|
|
9
|
+
## Contents
|
|
10
|
+
|
|
11
|
+
1. Knowing what changed
|
|
12
|
+
2. Ports whose type is chosen or follows a connection (6.7)
|
|
13
|
+
3. Blackboard types and variable nodes (6.7)
|
|
14
|
+
4. Context menus (6.7)
|
|
15
|
+
5. Custom node UI (6.7)
|
|
16
|
+
|
|
17
|
+
## 1. Knowing what changed
|
|
18
|
+
|
|
19
|
+
```csharp
|
|
20
|
+
[NonSerialized] HashSet<Hash128> m_KnownNodes;
|
|
21
|
+
|
|
22
|
+
public override void OnGraphChanged(GraphLogger logger)
|
|
23
|
+
{
|
|
24
|
+
// 6.7 and newer: added and modified nodes.
|
|
25
|
+
foreach (var change in logger.GraphChanges.ChangedNodes)
|
|
26
|
+
if (change.Node is ObjectiveNode objective && (change.ChangeKinds & ChangeKind.Added) != 0) { /* new */ }
|
|
27
|
+
|
|
28
|
+
// Every version: removed nodes, and on 6.6 additions too, come from diffing IDs.
|
|
29
|
+
var current = new HashSet<Hash128>(GetNodes().Select(n => n.ID));
|
|
30
|
+
if (m_KnownNodes != null)
|
|
31
|
+
foreach (var removed in m_KnownNodes.Except(current)) { /* removed */ }
|
|
32
|
+
m_KnownNodes = current;
|
|
33
|
+
}
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
- **6.7** `GraphLogger.GraphChanges` is the change delta. It does not exist on 6.6.
|
|
37
|
+
- The delta lists added and modified elements only. Removed nodes, variables and subgraph nodes are
|
|
38
|
+
never reported; removed ports are, under `ChangedNode.ChangedPorts` with `ChangeKind.Removed`.
|
|
39
|
+
- Members are in `graphchanges.md` and `changekind.md`. Each entry exposes its element by type,
|
|
40
|
+
for example `ChangedNode.Node`, plus `ChangeKinds` flags to test with `&`.
|
|
41
|
+
- The ID cache is `[NonSerialized]` so it is not written to the asset, and it starts null after a
|
|
42
|
+
domain reload, so the first call only fills it.
|
|
43
|
+
- Never mutate the graph in `OnGraphChanged`; it throws `InvalidOperationException`. Offer the fix as
|
|
44
|
+
a `GraphLogAction` on the message instead.
|
|
45
|
+
|
|
46
|
+
## 2. Ports whose type is chosen or follows a connection (6.7)
|
|
47
|
+
|
|
48
|
+
- `WithDataTypes(params Type[])` or `WithDataTypes(IEnumerable<Type>)` on an untyped port builder makes
|
|
49
|
+
a polymorphic port that accepts any of the listed types. At least one type; duplicates are ignored.
|
|
50
|
+
On 6.6, use an untyped port and allow the connections in `Graph.IsConnectionAllowed`.
|
|
51
|
+
- `IPort.TrySetDataType(Type)` changes a port's type, and the override
|
|
52
|
+
`Node.OnPortDataTypeChanged(IPort port, Type previous, Type next)` reacts to it, for ports whose type
|
|
53
|
+
follows what they are connected to.
|
|
54
|
+
- `Graph.UndoBeginRecordGraph(string actionName, params Node[] nodesToRecord)` records specific nodes.
|
|
55
|
+
|
|
56
|
+
## 3. Blackboard types and variable nodes (6.7)
|
|
57
|
+
|
|
58
|
+
- Restrict the Blackboard type dropdown by overriding
|
|
59
|
+
`protected virtual IEnumerable<Type> BuildAvailableVariableTypes(IReadOnlyCollection<Type> baseSupportedTypes)`
|
|
60
|
+
and `BuildAvailableConstantTypes(...)` on the graph. `Graph.SupportedTypes`, `AvailableVariableTypes`
|
|
61
|
+
and `AvailableConstantTypes` list the result. On 6.6 the type list is not customizable. A
|
|
62
|
+
`StateMachine` overrides the parameterless `BuildAvailableVariableTypes()` and has no constant types.
|
|
63
|
+
- `Graph.AddVariableNode(IVariable, Vector2, VariableNodeMode)` with `VariableNodeMode.Get` or `Set`,
|
|
64
|
+
read back through `IVariableNode.Mode`.
|
|
65
|
+
|
|
66
|
+
## 4. Context menus (6.7)
|
|
67
|
+
|
|
68
|
+
```csharp
|
|
69
|
+
[GraphMenu(typeof(MyGraph))]
|
|
70
|
+
static void AddGraphMenuEntries(GraphMenuContext context)
|
|
71
|
+
{
|
|
72
|
+
if (context.ClickedObject is INode node)
|
|
73
|
+
context.AppendAction("Inspect node", () => Debug.Log(node.Title));
|
|
74
|
+
context.AppendSeparator();
|
|
75
|
+
}
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
The context has `object ClickedObject`, `Vector2 MousePosition`, `AppendAction(name, Action)`,
|
|
79
|
+
`AppendAction(name, Action<DropdownMenuAction>[, status callback])` and `AppendSeparator(subMenuPath)`.
|
|
80
|
+
`[BlackboardMenu(typeof(MyGraph))]` receives the same context for the Blackboard. State machine menus
|
|
81
|
+
are in `state-machine-api.md`.
|
|
82
|
+
|
|
83
|
+
## 5. Custom node UI (6.7)
|
|
84
|
+
|
|
85
|
+
`class MyNodeView : NodeView<MyNode>` adds UI Toolkit elements to a node. Discovery is by the generic
|
|
86
|
+
argument, walking up the node's inheritance chain. On 6.6 the only styling is USS through
|
|
87
|
+
`[Node(category, icon, title, stylesheet)]`, `Node.DefaultColor` and `Node.FillAmount`.
|
|
88
|
+
|
|
89
|
+
| Symptom | Cause | Fix |
|
|
90
|
+
|---|---|---|
|
|
91
|
+
| Duplicated labels or buttons pile up on the node | UI allocated in `OnViewAttached`, which fires on every re-attach | Allocate in `OnViewBuilt`, cache, append to `View.Root` |
|
|
92
|
+
| The custom element disappears after zooming far out and back | Culling clears `Root` | Re-add the cached element in `OnCullingChanged(false)` |
|
|
93
|
+
|
|
94
|
+
Also available: `OnViewDetached()`, `OnViewLODChanged(float zoom)`. The same rules apply to
|
|
95
|
+
`StateView<T>`. `ConditionView<T>` has no LOD or culling callbacks: `OnViewBuilt`, `OnViewAttached`,
|
|
96
|
+
`OnViewDetached` and `OnConditionChanged` only.
|