@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,81 @@
|
|
|
1
|
+
# PixelPerfect Skill — Full API Reference
|
|
2
|
+
|
|
3
|
+
## URP `PixelPerfectCamera` (`UnityEngine.Rendering.Universal`)
|
|
4
|
+
API is identical since Unity 2023.2 through latest Unity 6 versions.
|
|
5
|
+
|
|
6
|
+
### Properties
|
|
7
|
+
|
|
8
|
+
| Property | Type | Access | Description |
|
|
9
|
+
|---|---|---|---|
|
|
10
|
+
| `assetsPPU` | `int` | get/set | Must match Pixels Per Unit on all sprites in scene |
|
|
11
|
+
| `refResolutionX` | `int` | get/set | Base resolution width |
|
|
12
|
+
| `refResolutionY` | `int` | get/set | Base resolution height |
|
|
13
|
+
| `cropFrame` | `CropFrame` | get/set | How to handle aspect ratio differences |
|
|
14
|
+
| `gridSnapping` | `GridSnapping` | get/set | Snapping mode — replaces old `pixelSnapping`/`upscaleRT` bools |
|
|
15
|
+
| `orthographicSize` | `float` | get only | PP Camera's calculated ortho size (different from `Camera.orthographicSize`) |
|
|
16
|
+
| `pixelRatio` | `int` | get only | Actual scale factor applied (e.g. 6 on 1080p with 320×180 ref res) |
|
|
17
|
+
| `requiresUpscalePass` | `bool` | get only | True when `gridSnapping = UpscaleRenderTexture` |
|
|
18
|
+
|
|
19
|
+
### Methods
|
|
20
|
+
|
|
21
|
+
| Method | Returns | Description |
|
|
22
|
+
|---|---|---|
|
|
23
|
+
| `RoundToPixel(Vector3)` | `Vector3` | Snaps world-space position to pixel grid. Adapts to current `gridSnapping`. |
|
|
24
|
+
| `CorrectCinemachineOrthoSize(float)` | `float` | Returns nearest pixel-perfect ortho size. Used by the Cinemachine extension. |
|
|
25
|
+
|
|
26
|
+
### Static
|
|
27
|
+
|
|
28
|
+
**`UnityEngine.U2D.PixelPerfectRendering.pixelSnapSpacing`** (static float) — world-space size of one screen pixel. Formula: `Camera.orthographicSize * 2f / Camera.pixelHeight`. Set manually in custom setups that bypass the PP Camera component (e.g. HDRP fallback, custom SRP).
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## `GridSnapping` Enum
|
|
33
|
+
|
|
34
|
+
| Value | Old standalone equivalent | Behaviour |
|
|
35
|
+
|---|---|---|
|
|
36
|
+
| `None` | `pixelSnapping = false`, `upscaleRT = false` | No snapping. |
|
|
37
|
+
| `PixelSnapping` | `pixelSnapping = true` | Snaps SpriteRenderers at render-time. Transforms stay at float precision. |
|
|
38
|
+
| `UpscaleRenderTexture` | `upscaleRT = true` | Renders at ref res then upscales. Incompatible with post-processing and UI text. |
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## `CropFrame` Enum
|
|
43
|
+
|
|
44
|
+
| Value | Old standalone equivalent | Behaviour |
|
|
45
|
+
|---|---|---|
|
|
46
|
+
| `None` | both false | No cropping. Scene stretches to fill screen. |
|
|
47
|
+
| `Pillarbox` | `cropFrameX = true, cropFrameY = false` | Black bars left and right. |
|
|
48
|
+
| `Letterbox` | `cropFrameX = false, cropFrameY = true` | Black bars top and bottom. |
|
|
49
|
+
| `Windowbox` | both true, `stretchFill = false` | Black bars all sides. Safest default. |
|
|
50
|
+
| `StretchFill` | both true, `stretchFill = true` | Fills screen maintaining aspect ratio. Enables component-level Filter Mode. |
|
|
51
|
+
|
|
52
|
+
**Filter Mode** (only active when `StretchFill` — separate from per-sprite texture Filter Mode):
|
|
53
|
+
- `Retro AA` — default. Integer upscale to nearest multiple, then bilinear to screen. Recommended.
|
|
54
|
+
- `Point` — nearest-neighbour all the way to screen. Can lose pixel-perfectness at non-integer scale factors.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Recommended Configurations
|
|
59
|
+
|
|
60
|
+
| Use case | `gridSnapping` | `cropFrame` | Notes |
|
|
61
|
+
|---|---|---|---|
|
|
62
|
+
| Standard pixel art | `PixelSnapping` | `Windowbox` | Safe default. Compatible with post-processing and UI. |
|
|
63
|
+
| Authentic low-res look | `UpscaleRenderTexture` | `Windowbox` | No post-processing. Separate UI camera required. |
|
|
64
|
+
| Performance on 4K/HiDPI | `UpscaleRenderTexture` | `Windowbox` | Renders fewer pixels. Same UI caveat. |
|
|
65
|
+
| Full-screen stretch | `PixelSnapping` | `StretchFill` | Use `Retro AA` filter, not Point. |
|
|
66
|
+
|
|
67
|
+
---
|
|
68
|
+
|
|
69
|
+
## Standalone Built-in (`UnityEngine.U2D.PixelPerfectCamera`)
|
|
70
|
+
All booleans, no enums. No `RoundToPixel`, `CorrectCinemachineOrthoSize`, `requiresUpscalePass`, or `orthographicSize`.
|
|
71
|
+
|
|
72
|
+
| Property | Type | Constraint |
|
|
73
|
+
|---|---|---|
|
|
74
|
+
| `assetsPPU` | `int` | — |
|
|
75
|
+
| `refResolutionX` / `refResolutionY` | `int` | — |
|
|
76
|
+
| `pixelSnapping` | `bool` | Silently ignored when `upscaleRT = true` |
|
|
77
|
+
| `upscaleRT` | `bool` | When true, `pixelSnapping` has no effect |
|
|
78
|
+
| `cropFrameX` | `bool` | Black bars left/right |
|
|
79
|
+
| `cropFrameY` | `bool` | Black bars top/bottom |
|
|
80
|
+
| `stretchFill` | `bool` | Only functional when **both** `cropFrameX` and `cropFrameY` are `true` |
|
|
81
|
+
| `pixelRatio` | `int` readonly | Same semantics as URP `pixelRatio` |
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
// PixelPerfect Skill — Built-in Standalone Camera Setup
|
|
2
|
+
// -------------------------------------------------------
|
|
3
|
+
// Assembly: Unity.2D.PixelPerfect
|
|
4
|
+
using UnityEngine;
|
|
5
|
+
using UnityEngine.U2D;
|
|
6
|
+
|
|
7
|
+
namespace PixelPerfect
|
|
8
|
+
{
|
|
9
|
+
public static class CameraSetupBuiltIn
|
|
10
|
+
{
|
|
11
|
+
public static PixelPerfectCamera ConfigureCamera(Camera camera, int refResX, int refResY, int targetPPU)
|
|
12
|
+
{
|
|
13
|
+
var pp = camera.gameObject.GetComponent<PixelPerfectCamera>()
|
|
14
|
+
?? camera.gameObject.AddComponent<PixelPerfectCamera>();
|
|
15
|
+
|
|
16
|
+
// Same base settings as URP
|
|
17
|
+
camera.orthographic = true;
|
|
18
|
+
camera.orthographicSize = (refResY / 2f) / targetPPU;
|
|
19
|
+
camera.allowHDR = camera.allowMSAA = camera.allowDynamicResolution = false;
|
|
20
|
+
QualitySettings.antiAliasing = 0;
|
|
21
|
+
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
|
|
22
|
+
|
|
23
|
+
pp.assetsPPU = targetPPU;
|
|
24
|
+
pp.refResolutionX = refResX;
|
|
25
|
+
pp.refResolutionY = refResY;
|
|
26
|
+
pp.pixelSnapping = true; // silently ignored when upscaleRT = true
|
|
27
|
+
pp.upscaleRT = false;
|
|
28
|
+
pp.cropFrameX = true; // black bars left/right
|
|
29
|
+
pp.cropFrameY = true; // black bars top/bottom — both true = Windowbox equivalent
|
|
30
|
+
pp.stretchFill = false; // only functional when BOTH cropFrameX and cropFrameY are true
|
|
31
|
+
|
|
32
|
+
// Read-only: pp.pixelRatio (int) — same semantics as URP pixelRatio
|
|
33
|
+
//
|
|
34
|
+
// Note: No RoundToPixel, CorrectCinemachineOrthoSize, requiresUpscalePass,
|
|
35
|
+
// or orthographicSize on the standalone component.
|
|
36
|
+
|
|
37
|
+
return pp;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// PixelPerfect Skill — URP Camera Setup
|
|
2
|
+
// ---------------------------------------
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.Rendering.Universal;
|
|
5
|
+
using UnityEngine.U2D;
|
|
6
|
+
|
|
7
|
+
namespace PixelPerfect
|
|
8
|
+
{
|
|
9
|
+
public static class CameraSetupURP
|
|
10
|
+
{
|
|
11
|
+
// orthographicSize formula: (refResY / 2) / PPU
|
|
12
|
+
// e.g. 320x180 at 16 PPU → 90 / 16 = 5.625
|
|
13
|
+
public static PixelPerfectCamera ConfigureCamera(Camera camera, int refResX, int refResY, int targetPPU)
|
|
14
|
+
{
|
|
15
|
+
var pp = camera.gameObject.GetComponent<PixelPerfectCamera>()
|
|
16
|
+
?? camera.gameObject.AddComponent<PixelPerfectCamera>();
|
|
17
|
+
|
|
18
|
+
camera.orthographic = true;
|
|
19
|
+
camera.orthographicSize = (refResY / 2f) / targetPPU;
|
|
20
|
+
camera.allowHDR = camera.allowMSAA = camera.allowDynamicResolution = false;
|
|
21
|
+
QualitySettings.antiAliasing = 0;
|
|
22
|
+
QualitySettings.anisotropicFiltering = AnisotropicFiltering.Disable;
|
|
23
|
+
|
|
24
|
+
pp.assetsPPU = targetPPU;
|
|
25
|
+
pp.refResolutionX = refResX;
|
|
26
|
+
pp.refResolutionY = refResY;
|
|
27
|
+
pp.gridSnapping = PixelPerfectCamera.GridSnapping.PixelSnapping; // or UpscaleRenderTexture
|
|
28
|
+
pp.cropFrame = PixelPerfectCamera.CropFrame.Windowbox; // or None/Pillarbox/Letterbox/StretchFill
|
|
29
|
+
|
|
30
|
+
// Read-only properties (for reference):
|
|
31
|
+
// pp.pixelRatio (int) — actual scale factor applied (e.g. 6 on 1080p with 320x180 ref res)
|
|
32
|
+
// pp.requiresUpscalePass (bool) — true when gridSnapping = UpscaleRenderTexture
|
|
33
|
+
// pp.orthographicSize (float) — PP-calculated ortho size (different from Camera.orthographicSize)
|
|
34
|
+
|
|
35
|
+
// Utility methods (for reference):
|
|
36
|
+
// pp.RoundToPixel(Vector3) — pixel-grid snapping for custom camera controllers
|
|
37
|
+
// pp.CorrectCinemachineOrthoSize(float) — used by Cinemachine extension
|
|
38
|
+
|
|
39
|
+
return pp;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
// For custom setups that bypass the PP Camera component (e.g. HDRP fallback, custom SRP):
|
|
43
|
+
// set pixelSnapSpacing manually to enable snapping at the renderer level.
|
|
44
|
+
public static void SetManualPixelSnapSpacing(Camera camera)
|
|
45
|
+
{
|
|
46
|
+
PixelPerfectRendering.pixelSnapSpacing = camera.orthographicSize * 2f / camera.pixelHeight;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
// PixelPerfect Skill — Pipeline Detection
|
|
2
|
+
// ----------------------------------------
|
|
3
|
+
using UnityEngine;
|
|
4
|
+
using UnityEngine.Rendering;
|
|
5
|
+
using UnityEngine.U2D;
|
|
6
|
+
|
|
7
|
+
namespace PixelPerfect
|
|
8
|
+
{
|
|
9
|
+
public enum PipelineType { BuiltIn, URP, HDRP, Custom }
|
|
10
|
+
|
|
11
|
+
public static class PipelineDetection
|
|
12
|
+
{
|
|
13
|
+
// GraphicsSettings.currentRenderPipeline is always up to date — safe to call on startup.
|
|
14
|
+
// Do NOT use RenderPipelineManager.currentPipeline: it is null until at least one frame renders.
|
|
15
|
+
public static PipelineType DetectPipeline()
|
|
16
|
+
{
|
|
17
|
+
var rpa = GraphicsSettings.currentRenderPipeline;
|
|
18
|
+
if (rpa == null) return PipelineType.BuiltIn;
|
|
19
|
+
|
|
20
|
+
// Use FullName (includes namespace) — more stable than Name, which strips the namespace.
|
|
21
|
+
// URP: UnityEngine.Rendering.Universal.UniversalRenderPipelineAsset
|
|
22
|
+
// HDRP: UnityEngine.Rendering.HighDefinition.HDRenderPipelineAsset
|
|
23
|
+
var fullName = rpa.GetType().FullName ?? string.Empty;
|
|
24
|
+
if (fullName.Contains("Universal")) return PipelineType.URP;
|
|
25
|
+
if (fullName.Contains("HighDefinition")) return PipelineType.HDRP;
|
|
26
|
+
return PipelineType.Custom;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
public static System.Type GetPixelPerfectCameraType(PipelineType pipeline)
|
|
30
|
+
{
|
|
31
|
+
if (pipeline == PipelineType.URP)
|
|
32
|
+
{
|
|
33
|
+
var t = System.Type.GetType(
|
|
34
|
+
"UnityEngine.Rendering.Universal.PixelPerfectCamera, " +
|
|
35
|
+
"Unity.RenderPipelines.Universal.2D.Runtime");
|
|
36
|
+
if (t != null) return t;
|
|
37
|
+
Debug.LogWarning("URP detected but PixelPerfectCamera not found. Is the 2D Renderer installed?");
|
|
38
|
+
}
|
|
39
|
+
// Assembly name confirmed from asmdef — no "Runtime" suffix
|
|
40
|
+
return System.Type.GetType("UnityEngine.U2D.PixelPerfectCamera, Unity.2D.PixelPerfect");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Migration diagnostic: check for the wrong component type on a URP camera
|
|
44
|
+
public static bool HasPipelineMismatch(Camera camera)
|
|
45
|
+
{
|
|
46
|
+
return DetectPipeline() == PipelineType.URP
|
|
47
|
+
&& camera.GetComponent<PixelPerfectCamera>() != null;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
// PixelPerfect Skill — Sprite Import Settings (Editor-only)
|
|
2
|
+
// ----------------------------------------------------------
|
|
3
|
+
#if UNITY_EDITOR
|
|
4
|
+
using UnityEditor;
|
|
5
|
+
using UnityEngine;
|
|
6
|
+
|
|
7
|
+
namespace PixelPerfect.Editor
|
|
8
|
+
{
|
|
9
|
+
public static class SpriteImportUtility
|
|
10
|
+
{
|
|
11
|
+
public static TextureImporter GetImporter(Sprite sprite)
|
|
12
|
+
{
|
|
13
|
+
if (sprite == null) return null;
|
|
14
|
+
var path = AssetDatabase.GetAssetPath(sprite);
|
|
15
|
+
if (string.IsNullOrEmpty(path)) return null;
|
|
16
|
+
return AssetImporter.GetAtPath(path) as TextureImporter;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
public static bool FixSpriteImportSettings(Sprite sprite, int targetPPU)
|
|
20
|
+
{
|
|
21
|
+
var importer = GetImporter(sprite);
|
|
22
|
+
if (importer == null) { Debug.LogWarning($"No importer for: {sprite?.name}"); return false; }
|
|
23
|
+
|
|
24
|
+
importer.filterMode = FilterMode.Point;
|
|
25
|
+
importer.mipmapEnabled = false;
|
|
26
|
+
importer.textureCompression = TextureImporterCompression.Uncompressed;
|
|
27
|
+
importer.spritePixelsPerUnit = targetPPU;
|
|
28
|
+
AssetDatabase.ImportAsset(AssetDatabase.GetAssetPath(sprite), ImportAssetOptions.ForceUpdate);
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// After batch-fixing multiple sprites, always flush with:
|
|
33
|
+
// AssetDatabase.SaveAssets();
|
|
34
|
+
// AssetDatabase.Refresh();
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
#endif
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Security notes: asset-transformer-toolkit
|
|
2
|
+
|
|
3
|
+
This skill has the agent write C# and run it inside the user's live Unity Editor, to create and edit Asset Transformer RuleSets. It doesn't say which command runs the code; with the `unity` CLI that is `unity command script eval`. Automated skill scanners flag running generated code 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 agent-written C# in the user's live Editor | 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. The code only edits RuleSet assets in the user's own project. No code fetched from a remote source is run. |
|
|
10
|
+
|
|
11
|
+
## Mitigations
|
|
12
|
+
|
|
13
|
+
- **Only the user's own Editor.** The code runs in the Editor open on this machine. It can't reach another machine or another user's Editor.
|
|
14
|
+
- **Narrow purpose.** The scripts create or modify RuleSet assets through the documented Asset Transformer API, then validate them against the checklist in `references/`.
|
|
15
|
+
- **No remote code.** The agent runs C# it writes from this skill's own recipes. Nothing downloaded from outside is executed.
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: asset-transformer-toolkit
|
|
3
|
+
description: >-
|
|
4
|
+
In the Unity Editor, imports 3D models and point clouds with Asset Transformer Toolkit (formerly
|
|
5
|
+
Pixyz), and creates, edits, and runs RuleSets, Actions, and LODs. Use for Pixyz imports in a Unity
|
|
6
|
+
project, not for converting files from the shell.
|
|
7
|
+
required_packages:
|
|
8
|
+
com.unity.industry.toolkit: ">=4.0.0"
|
|
9
|
+
---
|
|
10
|
+
### Before you start: check the package version
|
|
11
|
+
This skill needs Asset Transformer Toolkit 4.0.0 or later (`com.unity.industry.toolkit`). Earlier versions don't have the `ATTAssistantUtilities` API every workflow below relies on.
|
|
12
|
+
|
|
13
|
+
1. Read the resolved version of `com.unity.industry.toolkit` from `Packages/packages-lock.json` (fall back to `Packages/manifest.json`).
|
|
14
|
+
2. **Not installed:** tell the user this workflow needs Asset Transformer Toolkit 4.0 or later, which is an entitled Unity package they may need access to through their Unity plan, and stop. Don't add it to the manifest yourself.
|
|
15
|
+
3. **Installed below 4.0.0:** tell the user which version you found and that 4.0 or later is required, and ask before upgrading. Don't fall back to older APIs, raw C# against internal types, or reflection.
|
|
16
|
+
4. **4.0.0 or later:** continue.
|
|
17
|
+
|
|
18
|
+
### API Reference
|
|
19
|
+
Tool functions are provided by `Unity.Pixyz.Plugin4Unity.Editor.AI.ATTAssistantUtilities`. They are documented inline in each reference file below alongside the classes they operate on.
|
|
20
|
+
|
|
21
|
+
### Technical Notes
|
|
22
|
+
Pixyz Plugin is the former name of Asset Transformer Toolkit. Prefer using the term 'Asset Transformer Toolkit' when addressing the user, unless the user is using the term 'Pixyz'
|
|
23
|
+
Most classes and code are in the Unity.Pixyz.Plugin4Unity.Editor assembly.
|
|
24
|
+
Asset Transformer Toolkit is NOT the same thing as Asset Transformer Studio/Pixyz Studio. NEVER rely on information about Asset Transformer Studio.
|
|
25
|
+
|
|
26
|
+
### Importers
|
|
27
|
+
Asset Transformer Toolkit can import 3D file from outside the project.
|
|
28
|
+
When modifying Importers, NEVER assume it should be immediately followed by a reimport. The import process can be very long, so it must only be launched when the user requests it.
|
|
29
|
+
Modify fields in Importers using the ScriptableObject API. NEVER use reflection to access or modify Importer fields — reflection is not available.
|
|
30
|
+
To create a Pixyz/Asset Transformer Toolkit Importer for importing a file, or to reimport a model using an existing ImporterScriptableObject, read [references/create-importer](references/create-importer.md)
|
|
31
|
+
|
|
32
|
+
### RuleSets and Actions
|
|
33
|
+
Read [references/rulesets-and-actions](references/rulesets-and-actions.md)
|
|
34
|
+
Read [references/ruleset-api](references/ruleset-api.md) when the RuleSet API is needed.
|
|
35
|
+
Read [references/rule-api](references/rule-api.md) when the Rule API is needed.
|
|
36
|
+
Read [references/ruleblock-api](references/ruleblock-api.md) when the RuleBlock API is needed, including `ActionBase.Id` for constructing `RuleBlock` instances.
|
|
37
|
+
|
|
38
|
+
### Levels of Detail
|
|
39
|
+
Read [references/lods](references/lods.md)
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
## Contents
|
|
2
|
+
- [Workflow steps](#workflow) — Pre-Flight, Create Importer, Configure Importer, Import
|
|
3
|
+
- [Importer utility functions](#importer-utility-functions) — `EnsureImporterSaveFolder`, `GetImporterTypes`, `GetImporterProperties`, `CreateImporter`, `CanImportFile`, `ImportFile`
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
If a new Importer does not need to be created, skip to Step 3
|
|
8
|
+
|
|
9
|
+
### Step 1: Pre-Flight
|
|
10
|
+
- Check whether an importer asset already exists for this file. If it does, skip to Step 3.
|
|
11
|
+
- Verify the file to be imported exists.
|
|
12
|
+
- Verify the file type is supported by Pixyz/Asset Transformer Toolkit using `ATTAssistantUtilities.CanImportFile()`.
|
|
13
|
+
- Check what kind of file (eg. point cloud, CAD) is it. Find the Importer type that would best match it.
|
|
14
|
+
|
|
15
|
+
### Step 2: Create Importer
|
|
16
|
+
- Create the appropriate Importer asset with the path to the file to be imported. The path must be relative to the Application.dataPath.
|
|
17
|
+
- If there are issues, fix and revalidate. Do not exceed 3 iterations.
|
|
18
|
+
Do not continue if this step cannot be completed successfully.
|
|
19
|
+
|
|
20
|
+
### Step 3: Configure Importer
|
|
21
|
+
- If requested, change the importer's settings.
|
|
22
|
+
- If requested, assign the requested RuleSet to the Importer.
|
|
23
|
+
- If requested, make changes to the LOD generation.
|
|
24
|
+
Continue only if asked to also import the file. The import process can be very long, so NEVER assume you must import the file unless it was requested.
|
|
25
|
+
|
|
26
|
+
### Step 4: Import
|
|
27
|
+
- Start the asynchronous import using `ATTAssistantUtilities.ImportFile()`.
|
|
28
|
+
- Report whether the import process started successfully. Remind the user this is a background process.
|
|
29
|
+
|
|
30
|
+
## Importer utility functions
|
|
31
|
+
|
|
32
|
+
The following functions are from `Unity.Pixyz.Plugin4Unity.Editor.AI.ATTAssistantUtilities`.
|
|
33
|
+
|
|
34
|
+
### `EnsureImporterSaveFolder`
|
|
35
|
+
|
|
36
|
+
Returns the project-relative asset save folder configured in Asset Transformer Toolkit Project Settings, creating it if it does not already exist. Use this as the destination path when creating a new `ImporterScriptableObject` asset.
|
|
37
|
+
|
|
38
|
+
```csharp
|
|
39
|
+
public static string EnsureImporterSaveFolder()
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Returns a `string` such as `"Assets/3DModels"`.
|
|
43
|
+
|
|
44
|
+
### `GetImporterTypes`
|
|
45
|
+
|
|
46
|
+
Returns the names of all `ImporterScriptableObject` types available in the project, including user-defined importers. Always call this before creating or referencing an importer type — never assume a type exists.
|
|
47
|
+
|
|
48
|
+
```csharp
|
|
49
|
+
public static string[] GetImporterTypes()
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Returns a `string[]` of unqualified type names (e.g. `"CADImporterScriptableObject"`).
|
|
53
|
+
|
|
54
|
+
### `GetImporterProperties`
|
|
55
|
+
|
|
56
|
+
Returns the public serialized fields of an `ImporterScriptableObject` type by name, including fields from intermediate base classes. Use this to discover what settings are available on any importer type — concrete importer classes may be internal or user-defined.
|
|
57
|
+
|
|
58
|
+
```csharp
|
|
59
|
+
public static ImporterPropertyInfo[] GetImporterProperties(string typeName)
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
| Parameter | Type | Default | Description |
|
|
63
|
+
|-----------|------|---------|-------------|
|
|
64
|
+
| `typeName` | string | required | Unqualified type name as returned by `GetImporterTypes()`. |
|
|
65
|
+
|
|
66
|
+
Returns an `ImporterPropertyInfo[]`. Each entry has the following fields:
|
|
67
|
+
|
|
68
|
+
| Field | Type | Description |
|
|
69
|
+
|-------|------|-------------|
|
|
70
|
+
| `Name` | string | Human-readable property name. |
|
|
71
|
+
| `Type` | string | Unqualified type name of the field. |
|
|
72
|
+
| `SerializedPropertyPath` | string | The exact string to pass to `SerializedObject.FindProperty`. For auto-properties declared with `[field: SerializeField]`, this differs from `Name` (e.g. `<MyProperty>k__BackingField`). Always use this field — never construct the path from `Name` yourself. |
|
|
73
|
+
|
|
74
|
+
### `CreateImporter`
|
|
75
|
+
|
|
76
|
+
Creates a new `ImporterScriptableObject` asset for the given file. Call `GetImporterTypes()` first to confirm the type name — never assume or invent one. Use `EnsureImporterSaveFolder()` to get the correct save path.
|
|
77
|
+
|
|
78
|
+
```csharp
|
|
79
|
+
public static string CreateImporter(string filePath, string typeName, string savePath)
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
| Parameter | Type | Default | Description |
|
|
83
|
+
|-----------|------|---------|-------------|
|
|
84
|
+
| `filePath` | string | required | Absolute system path to the 3D file the importer will reference. |
|
|
85
|
+
| `typeName` | string | required | Unqualified importer type name as returned by `GetImporterTypes()`. |
|
|
86
|
+
| `savePath` | string | required | Project-relative folder path where the importer asset will be saved. |
|
|
87
|
+
|
|
88
|
+
Returns a `string` with the project-relative path to the created asset (e.g. `"Assets/3DModels/MyModel.asset"`). Pass this path to `ImportFile` to trigger import.
|
|
89
|
+
|
|
90
|
+
### `CanImportFile`
|
|
91
|
+
|
|
92
|
+
Checks whether the Asset Transformer Toolkit supports a file format. Call this before `ImportFile` to avoid runtime errors. Throws if no file exists at `filePath`.
|
|
93
|
+
|
|
94
|
+
```csharp
|
|
95
|
+
public static bool CanImportFile(string filePath)
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
| Parameter | Type | Default | Description |
|
|
99
|
+
|-----------|------|---------|-------------|
|
|
100
|
+
| `filePath` | string | required | Absolute system path to the 3D file to check. |
|
|
101
|
+
|
|
102
|
+
Returns `true` if the file format is supported, `false` otherwise.
|
|
103
|
+
|
|
104
|
+
### `ImportFile`
|
|
105
|
+
|
|
106
|
+
Triggers import or re-import using an existing `ImporterScriptableObject` asset. Requires an `ImporterScriptableObject` to already exist at `importerPath`.
|
|
107
|
+
|
|
108
|
+
```csharp
|
|
109
|
+
public static void ImportFile(string importerPath)
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
| Parameter | Type | Default | Description |
|
|
113
|
+
|-----------|------|---------|-------------|
|
|
114
|
+
| `importerPath` | string | required | Project-relative path to the `ImporterScriptableObject` asset. |
|
|
115
|
+
|
|
116
|
+
### Technical Notes
|
|
117
|
+
- Because import is an asynchronous process, the imported files may not yet exist in the project by the time the prompt finishes execution.
|
|
118
|
+
- The imported model will always be saved to the same directory that the ImporterScriptableObject lives in.
|
|
119
|
+
- Importers are designed to be extended. Check which Importer types exist in the project using `ATTAssistantUtilities.GetImporterTypes()` instead of making assumptions like a point cloud file always maps to the PointCloudImporterScriptableObject.
|
|
120
|
+
- Only one import should be processing at a time.
|
|
121
|
+
- When creating a new ImporterScriptableObject, save it under the folder returned by `ATTAssistantUtilities.EnsureImporterSaveFolder()`. This reflects the user-configured save folder from Project Settings and defaults to `"Assets/3DModels"`.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
Choose a path depending on the task.
|
|
2
|
+
|
|
3
|
+
### Path A: CADImporterScriptableObject
|
|
4
|
+
Choose this path if working with an object that is or inherits from CADImporterScriptableObject.
|
|
5
|
+
- Identify the types of LODs available in the project. Choose the one(s) most appropriate for your case.
|
|
6
|
+
- Find the LODGenerator property in the Importer.
|
|
7
|
+
- Execute the requested task.
|
|
8
|
+
- Verify the number of rules present in the Generator does not exceed 7.
|
|
9
|
+
|
|
10
|
+
### Path B: Scene Object
|
|
11
|
+
Choose this path when asked to work with a scene asset directly.
|
|
12
|
+
- Add a UnityEngine.PixyzPlugin4Unity.Components.LODGeneratorComponent script to the GameObject if one doesn't exist anywhere in the hierarchy.
|
|
13
|
+
- Execute the given task.
|
|
14
|
+
|
|
15
|
+
### Path C: PointCloudImporter
|
|
16
|
+
Choose this path when working with a PointCloudImporterScriptableObject object.
|
|
17
|
+
- The PointCloudImporter only permits enabling/disabling LOD generation and setting the number of LODs to be generated. Other actions like choosing the type of LODRule to apply is unsupported.
|
|
18
|
+
- Models imported by the PointCloudImporter will not have a LODGeneratorComponent script attached to them.
|
|
19
|
+
- If the task is permitted, execute it.
|
|
20
|
+
|
|
21
|
+
### Path D: Other Importer
|
|
22
|
+
Choose this path if working with a different importer type.
|
|
23
|
+
- This is a user defined importer and not part of the base Asset Transformer Toolkit package. Precise instructions cannot be provided.
|
|
24
|
+
- Attempt to perform the requested task, but do not exceed three iterations.
|
|
25
|
+
- If the task cannot be performed successfully, inform the user working with this object is not currently supported by Assistant.
|
|
26
|
+
|
|
27
|
+
## LOD utility functions
|
|
28
|
+
|
|
29
|
+
The following functions are from `Unity.Pixyz.Plugin4Unity.Editor.AI.ATTAssistantUtilities`.
|
|
30
|
+
|
|
31
|
+
### `GetLODRules`
|
|
32
|
+
|
|
33
|
+
Returns all available `LODRule` implementations and their parameters. Use this before constructing or modifying a LOD configuration to discover valid types.
|
|
34
|
+
|
|
35
|
+
```csharp
|
|
36
|
+
public static LODRuleDescription[] GetLODRules()
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
Returns a `LODRuleDescription[]`, each containing the type name, assembly-qualified name, and parameter list.
|
|
40
|
+
|
|
41
|
+
### `LODRuleDescription`
|
|
42
|
+
|
|
43
|
+
| Field | Type | Description |
|
|
44
|
+
|-------|------|-------------|
|
|
45
|
+
| `Name` | string | Unqualified class name of the LODRule type. |
|
|
46
|
+
| `QualifiedName` | string | Assembly-qualified name, suitable for `Type.GetType`. |
|
|
47
|
+
| `Parameters` | `LODParameterInfo[]` | Configurable properties on this LODRule type. |
|
|
48
|
+
|
|
49
|
+
### `LODParameterInfo`
|
|
50
|
+
|
|
51
|
+
| Field | Type | Description |
|
|
52
|
+
|-------|------|-------------|
|
|
53
|
+
| `Name` | string | Property name. |
|
|
54
|
+
| `Type` | string | Property type name. |
|
|
55
|
+
|
|
56
|
+
### Technical Notes
|
|
57
|
+
- The user will need to refresh the Inspector to see changes applied by Assistant.
|
|
58
|
+
- In an Importer's settings for LOD generation, the number of LODs set to generate does not include LOD0. There will always be one more LOD than the setting says. For example, setting the PointCloudImporter's NumberofLODs setting to 1 will result in the model having two LODs: LOD0 and LOD1.
|
|
59
|
+
- While Unity supports up to 8 LODs including LOD0, the PointCloudImporter is a special case that only supports 7.
|
|
60
|
+
- With the exception of models imported by the PointCloudImporter, models that were imported with LODs will have a LODGeneratorComponent script.
|
|
61
|
+
- LODs have nothing to do with RuleSets and Actions. RuleSets and Actions will NOT help with any LOD-related task.
|
|
@@ -0,0 +1,154 @@
|
|
|
1
|
+
## Contents
|
|
2
|
+
- [Rule constructors](#rule-constructors) — `Rule()`
|
|
3
|
+
- [Rule methods](#rule-methods) — `GetBlock`, `GetBlockIndex`, `RemoveBlockAt`, `RemoveBlock`, `AppendBlock`, `InsertBlock`, `IsLastBlock`
|
|
4
|
+
- [Rule properties](#rule-properties) — `Name`, `IsEnabled`, `BlocksCount`, `Blocks`
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Rule constructors
|
|
9
|
+
|
|
10
|
+
The Rule API reference contains the following constructors.
|
|
11
|
+
|
|
12
|
+
### `Rule()`
|
|
13
|
+
|
|
14
|
+
This constructor creates an empty Rule with no blocks.
|
|
15
|
+
|
|
16
|
+
```csharp
|
|
17
|
+
public Rule()
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Rule methods
|
|
21
|
+
|
|
22
|
+
The Rule API reference contains the following methods.
|
|
23
|
+
|
|
24
|
+
### `GetBlock`
|
|
25
|
+
|
|
26
|
+
This method retrieves the `RuleBlock` at the specified index.
|
|
27
|
+
|
|
28
|
+
```csharp
|
|
29
|
+
public RuleBlock GetBlock(int i)
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`GetBlock` accepts the following parameter.
|
|
33
|
+
|
|
34
|
+
| Parameter | Type | Default | Description |
|
|
35
|
+
|-----------|------|---------|-------------|
|
|
36
|
+
| `i` | int | required | Zero-based index of the block to retrieve. |
|
|
37
|
+
|
|
38
|
+
This method returns the `RuleBlock` at the given index.
|
|
39
|
+
|
|
40
|
+
### `GetBlockIndex`
|
|
41
|
+
|
|
42
|
+
This method returns the index of the given `RuleBlock` within the Rule.
|
|
43
|
+
|
|
44
|
+
```csharp
|
|
45
|
+
public int GetBlockIndex(RuleBlock block)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
`GetBlockIndex` accepts the following parameter.
|
|
49
|
+
|
|
50
|
+
| Parameter | Type | Default | Description |
|
|
51
|
+
|-----------|------|---------|-------------|
|
|
52
|
+
| `block` | RuleBlock | required | The `RuleBlock` whose index to find. |
|
|
53
|
+
|
|
54
|
+
This method returns an `int` index, or `-1` if the block is not found.
|
|
55
|
+
|
|
56
|
+
### `RemoveBlockAt`
|
|
57
|
+
|
|
58
|
+
This method removes the `RuleBlock` at the specified index.
|
|
59
|
+
|
|
60
|
+
```csharp
|
|
61
|
+
public void RemoveBlockAt(int index)
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
`RemoveBlockAt` accepts the following parameter.
|
|
65
|
+
|
|
66
|
+
| Parameter | Type | Default | Description |
|
|
67
|
+
|-----------|------|---------|-------------|
|
|
68
|
+
| `index` | int | required | Zero-based index of the block to remove. |
|
|
69
|
+
|
|
70
|
+
### `RemoveBlock`
|
|
71
|
+
|
|
72
|
+
This method removes a specific `RuleBlock` instance from the Rule.
|
|
73
|
+
|
|
74
|
+
```csharp
|
|
75
|
+
public void RemoveBlock(RuleBlock block)
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
`RemoveBlock` accepts the following parameter.
|
|
79
|
+
|
|
80
|
+
| Parameter | Type | Default | Description |
|
|
81
|
+
|-----------|------|---------|-------------|
|
|
82
|
+
| `block` | RuleBlock | required | The `RuleBlock` instance to remove. |
|
|
83
|
+
|
|
84
|
+
### `AppendBlock`
|
|
85
|
+
|
|
86
|
+
This method adds a `RuleBlock` to the end of the Rule and sets its back-reference to this Rule.
|
|
87
|
+
|
|
88
|
+
```csharp
|
|
89
|
+
public void AppendBlock(RuleBlock block)
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
`AppendBlock` accepts the following parameter.
|
|
93
|
+
|
|
94
|
+
| Parameter | Type | Default | Description |
|
|
95
|
+
|-----------|------|---------|-------------|
|
|
96
|
+
| `block` | RuleBlock | required | The `RuleBlock` instance to append. |
|
|
97
|
+
|
|
98
|
+
### `InsertBlock`
|
|
99
|
+
|
|
100
|
+
This method inserts a `RuleBlock` at the specified index, shifting subsequent blocks down. If `index` is beyond the last position, the block is appended instead.
|
|
101
|
+
|
|
102
|
+
```csharp
|
|
103
|
+
public void InsertBlock(RuleBlock block, int index)
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
`InsertBlock` accepts the following parameters.
|
|
107
|
+
|
|
108
|
+
| Parameter | Type | Default | Description |
|
|
109
|
+
|-----------|------|---------|-------------|
|
|
110
|
+
| `block` | RuleBlock | required | The `RuleBlock` instance to insert. |
|
|
111
|
+
| `index` | int | required | Zero-based position at which to insert the block. |
|
|
112
|
+
|
|
113
|
+
## Rule properties
|
|
114
|
+
|
|
115
|
+
The Rule API reference contains the following properties.
|
|
116
|
+
|
|
117
|
+
### `Name`
|
|
118
|
+
|
|
119
|
+
```csharp
|
|
120
|
+
public string Name { get; set; }
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
The display name of the Rule. Setting this property notifies the UI.
|
|
124
|
+
|
|
125
|
+
> **Note:** C# property names are case-sensitive. Use `Name` (capital N) — `name` does not exist and will not compile.
|
|
126
|
+
|
|
127
|
+
```csharp
|
|
128
|
+
rule.Name = "My Rule";
|
|
129
|
+
string ruleName = rule.Name;
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
### `IsEnabled`
|
|
133
|
+
|
|
134
|
+
```csharp
|
|
135
|
+
public bool IsEnabled { get; set; }
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
Controls whether the Rule is active within its RuleSet. When `false`, the Rule is skipped during execution. Setting this property notifies the UI.
|
|
139
|
+
|
|
140
|
+
### `BlocksCount`
|
|
141
|
+
|
|
142
|
+
```csharp
|
|
143
|
+
public int BlocksCount { get; }
|
|
144
|
+
```
|
|
145
|
+
|
|
146
|
+
The number of `RuleBlock` instances currently in the Rule.
|
|
147
|
+
|
|
148
|
+
### `Blocks`
|
|
149
|
+
|
|
150
|
+
```csharp
|
|
151
|
+
public IEnumerable<RuleBlock> Blocks { get; }
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
An enumerable over all `RuleBlock` instances in the Rule, in execution order.
|