@alpsckr/unitycli 0.4.5 → 0.5.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/contracts/command-contract.json +591 -591
- package/contracts/package-files.json +367 -367
- package/contracts/stable-session/direct-call-semantics.json +3 -3
- package/contracts/stable-session/request-digest-v1-golden.json +2 -2
- package/contracts/tool-completion-contract.json +322 -322
- package/dist/bridge/domains/animation.js +37 -37
- package/dist/bridge/domains/animation.js.map +1 -1
- package/dist/bridge/domains/asset.js +15 -16
- package/dist/bridge/domains/asset.js.map +1 -1
- package/dist/bridge/domains/build.js +13 -13
- package/dist/bridge/domains/build.js.map +1 -1
- package/dist/bridge/domains/camera.js +7 -7
- package/dist/bridge/domains/camera.js.map +1 -1
- package/dist/bridge/domains/catalog-editor.d.ts +2 -0
- package/dist/bridge/domains/{project-tool.js → catalog-editor.js} +10 -10
- package/dist/bridge/domains/catalog-editor.js.map +1 -0
- package/dist/bridge/domains/catalog-player.d.ts +2 -0
- package/dist/bridge/domains/{runtime-tool.js → catalog-player.js} +9 -9
- package/dist/bridge/domains/catalog-player.js.map +1 -0
- package/dist/bridge/domains/code.js +1 -1
- package/dist/bridge/domains/code.js.map +1 -1
- package/dist/bridge/domains/console.js +2 -2
- package/dist/bridge/domains/console.js.map +1 -1
- package/dist/bridge/domains/doctor.js +3 -3
- package/dist/bridge/domains/doctor.js.map +1 -1
- package/dist/bridge/domains/editor.js +14 -14
- package/dist/bridge/domains/editor.js.map +1 -1
- package/dist/bridge/domains/game-object.js +16 -16
- package/dist/bridge/domains/game-object.js.map +1 -1
- package/dist/bridge/domains/lighting.d.ts +2 -0
- package/dist/bridge/domains/lighting.js +127 -0
- package/dist/bridge/domains/lighting.js.map +1 -0
- package/dist/bridge/domains/material.js +5 -5
- package/dist/bridge/domains/material.js.map +1 -1
- package/dist/bridge/domains/navmesh.js +3 -3
- package/dist/bridge/domains/navmesh.js.map +1 -1
- package/dist/bridge/domains/occlusion.js +1 -9
- package/dist/bridge/domains/occlusion.js.map +1 -1
- package/dist/bridge/domains/physics.js +14 -14
- package/dist/bridge/domains/physics.js.map +1 -1
- package/dist/bridge/domains/prefab.js +12 -12
- package/dist/bridge/domains/prefab.js.map +1 -1
- package/dist/bridge/domains/profiler.js +25 -25
- package/dist/bridge/domains/profiler.js.map +1 -1
- package/dist/bridge/domains/rendering.d.ts +2 -0
- package/dist/bridge/domains/rendering.js +71 -0
- package/dist/bridge/domains/rendering.js.map +1 -0
- package/dist/bridge/domains/runtime-reflection.d.ts +2 -0
- package/dist/bridge/domains/{reflection.js → runtime-reflection.js} +7 -7
- package/dist/bridge/domains/runtime-reflection.js.map +1 -0
- package/dist/bridge/domains/scene.js +15 -15
- package/dist/bridge/domains/scene.js.map +1 -1
- package/dist/bridge/domains/screenshot.js +6 -6
- package/dist/bridge/domains/screenshot.js.map +1 -1
- package/dist/bridge/domains/scriptable-object.js +4 -4
- package/dist/bridge/domains/scriptable-object.js.map +1 -1
- package/dist/bridge/domains/serialized-object.d.ts +2 -0
- package/dist/bridge/domains/{object.js → serialized-object.js} +6 -6
- package/dist/bridge/domains/serialized-object.js.map +1 -0
- package/dist/bridge/domains/shader.js +7 -7
- package/dist/bridge/domains/shader.js.map +1 -1
- package/dist/bridge/domains/texture.js +7 -7
- package/dist/bridge/domains/texture.js.map +1 -1
- package/dist/bridge/domains/timeline.js +4 -4
- package/dist/bridge/domains/timeline.js.map +1 -1
- package/dist/bridge/domains/ui.js +18 -18
- package/dist/bridge/domains/ui.js.map +1 -1
- package/dist/bridge/domains/volume.d.ts +2 -0
- package/dist/bridge/domains/volume.js +26 -0
- package/dist/bridge/domains/volume.js.map +1 -0
- package/dist/bridge/index.js +3 -3
- package/dist/bridge/index.js.map +1 -1
- package/dist/bridge/registry.js +15 -13
- package/dist/bridge/registry.js.map +1 -1
- package/dist/bridge/session-supervisor.js +4 -4
- package/dist/bridge/session-supervisor.js.map +1 -1
- package/dist/bridge/types.d.ts +1 -1
- package/dist/catalog-protocol.js +3 -3
- package/dist/catalog-protocol.js.map +1 -1
- package/dist/extensions/.generated-bridge-domains/cinemachine.js +14 -14
- package/dist/extensions/.generated-bridge-domains/cinemachine.js.map +1 -1
- package/dist/extensions/.generated-bridge-domains/hdrp.js +7 -7
- package/dist/extensions/.generated-bridge-domains/hdrp.js.map +1 -1
- package/dist/extensions/.generated-bridge-domains/probuilder.d.ts +3 -3
- package/dist/extensions/.generated-bridge-domains/probuilder.js +40 -40
- package/dist/extensions/.generated-bridge-domains/probuilder.js.map +1 -1
- package/dist/extensions/.generated-bridge-domains/urp.js +12 -12
- package/dist/extensions/.generated-bridge-domains/urp.js.map +1 -1
- package/dist/extensions/.generated-bridge-domains/vfx.js +27 -27
- package/dist/extensions/.generated-bridge-domains/vfx.js.map +1 -1
- package/dist/package-manager.js +1 -1
- package/dist/project-tool-discovery.d.ts +1 -1
- package/dist/project-tool-discovery.js +5 -5
- package/dist/project-tool-discovery.js.map +1 -1
- package/dist/runtime-code.js +2 -2
- package/dist/runtime-code.js.map +1 -1
- package/dist/services/reflect-service.d.ts +3 -3
- package/dist/services/reflect-service.js +5 -5
- package/dist/services/reflect-service.js.map +1 -1
- package/dist/tools/.generated-completion-registry.js +689 -689
- package/dist/tools/.generated-completion-registry.js.map +1 -1
- package/dist/tools/.generated-registry.d.ts +12 -12
- package/dist/tools/.generated-registry.js +12 -12
- package/dist/tools/.generated-registry.js.map +1 -1
- package/dist/tools/.generated-schemas.js +13 -13
- package/dist/tools/.generated-schemas.js.map +1 -1
- package/dist/tools/catalog.d.ts +1 -1
- package/dist/tools/catalog.js +1 -1
- package/dist/tools/code/{exec.d.ts → execute.d.ts} +1 -1
- package/dist/tools/code/{exec.js → execute.js} +5 -5
- package/dist/tools/code/execute.js.map +1 -0
- package/dist/tools/dispatcher.js +12 -8
- package/dist/tools/dispatcher.js.map +1 -1
- package/dist/tools/editor/compile.d.ts +3 -2
- package/dist/tools/editor/compile.js +23 -13
- package/dist/tools/editor/compile.js.map +1 -1
- package/dist/tools/editor/play-mode-status.js +2 -2
- package/dist/tools/editor/play-mode-status.js.map +1 -1
- package/dist/tools/editor/refresh.js +2 -2
- package/dist/tools/editor/refresh.js.map +1 -1
- package/dist/tools/metadata/derived.d.ts +0 -7
- package/dist/tools/metadata/derived.js +7 -16
- package/dist/tools/metadata/derived.js.map +1 -1
- package/dist/tools/metadata/index.d.ts +1 -1
- package/dist/tools/metadata/index.js +1 -1
- package/dist/tools/metadata/index.js.map +1 -1
- package/dist/tools/metadata/status.js +1 -1
- package/dist/tools/metadata/status.js.map +1 -1
- package/dist/tools/{runtime → player-runtime}/console.js +4 -4
- package/dist/tools/player-runtime/console.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/input/key.js +4 -4
- package/dist/tools/player-runtime/input/key.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/input/pointer.js +4 -4
- package/dist/tools/player-runtime/input/pointer.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/log.js +5 -5
- package/dist/tools/player-runtime/log.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/state.js +4 -4
- package/dist/tools/player-runtime/state.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/target-framerate/set.js +4 -4
- package/dist/tools/player-runtime/target-framerate/set.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/time-scale/set.js +4 -4
- package/dist/tools/player-runtime/time-scale/set.js.map +1 -0
- package/dist/tools/{runtime → player-runtime}/ui/capture-element.js +4 -4
- package/dist/tools/player-runtime/ui/capture-element.js.map +1 -0
- package/dist/tools/tools/group-summaries.js +17 -14
- package/dist/tools/tools/group-summaries.js.map +1 -1
- package/dist/tools/{reflect/member.js → type-inspection/get-member.js} +6 -6
- package/dist/tools/type-inspection/get-member.js.map +1 -0
- package/dist/tools/{reflect/type.js → type-inspection/get-type.js} +6 -6
- package/dist/tools/type-inspection/get-type.js.map +1 -0
- package/dist/tools/{reflect → type-inspection}/search.js +5 -5
- package/dist/tools/type-inspection/search.js.map +1 -0
- package/docs/README.md +1 -2
- package/docs/architecture.md +1 -1
- package/docs/availability-differences.md +2 -2
- package/docs/development.md +1 -1
- package/docs/error-codes.md +5 -5
- package/docs/extensions.md +2 -2
- package/docs/risk-and-side-effects.md +12 -12
- package/docs/safety-boundaries.md +7 -7
- package/docs/tool-discovery.md +1 -1
- package/docs/tool-execution.md +16 -16
- package/extensions/cinemachine/bridge/domains/cinemachine.ts +14 -14
- package/extensions/hdrp/bridge/domains/hdrp.ts +7 -7
- package/extensions/hdrp/unitypkg/Editor/Hdrp/HdrpToolSupport.cs +2 -2
- package/extensions/probuilder/bridge/domains/probuilder.ts +40 -40
- package/extensions/probuilder/unitypkg/Editor/ProBuilder/ProBuilderErrors.cs +1 -1
- package/extensions/urp/bridge/domains/urp.ts +12 -12
- package/extensions/urp/unitypkg/Editor/Urp/UrpToolSupport.cs +2 -2
- package/extensions/vfx-graph/bridge/domains/vfx.ts +27 -27
- package/package.json +1 -1
- package/skills/unitycli/SKILL.md +1 -1
- package/skills/unitycli/manifest.json +1 -1
- package/skills/unitycli/references/operation-protocol.md +1 -1
- package/unitypkg/Editor/Bridge/BridgeHttpServer.cs +2 -2
- package/unitypkg/Editor/Commands/ProjectToolCommands.cs +7 -7
- package/unitypkg/Editor/Commands/RuntimeToolCommands.cs +6 -6
- package/unitypkg/Editor/Generated/UnityCliToolCompletionRegistry.g.cs +147 -147
- package/unitypkg/Editor/Infrastructure/CodeExecSupport.cs +4 -4
- package/unitypkg/Editor/Infrastructure/UnityCliAdmission.cs +17 -17
- package/unitypkg/Editor/Infrastructure/UnityCliCompileCoordinator.cs +61 -54
- package/unitypkg/Editor/Infrastructure/UnityCliJson.cs +0 -18
- package/unitypkg/Editor/Infrastructure/UnityCliLiveRefreshCoordinator.cs +26 -21
- package/unitypkg/Editor/Infrastructure/UnityCliObjectPatch.cs +1 -1
- package/unitypkg/Editor/Infrastructure/UnityCliObjectRef.cs +5 -5
- package/unitypkg/Editor/Infrastructure/UnityCliOperationCoordinator.cs +32 -32
- package/unitypkg/Editor/Infrastructure/UnityCliReflection.cs +12 -12
- package/unitypkg/Editor/Infrastructure/UnityCliRuntimeExecutor.cs +1 -1
- package/unitypkg/Editor/ProjectTools/ProjectToolRegistry.cs +5 -5
- package/unitypkg/Editor/Tools/{animation → animation-clip}/AnimationToolSupport.cs +3 -3
- package/unitypkg/Editor/Tools/{animation/clip → animation-clip}/create.cs +4 -4
- package/unitypkg/Editor/Tools/{animation/clip.cs → animation-clip/read.cs} +3 -3
- package/unitypkg/Editor/Tools/{animation/clip/modify.cs → animation-clip/update.cs} +5 -5
- package/unitypkg/Editor/Tools/{animation/animator → animator}/crossfade.cs +1 -1
- package/unitypkg/Editor/Tools/{animation/animator → animator}/get-info.cs +1 -1
- package/unitypkg/Editor/Tools/{animation/animator → animator}/get-parameter.cs +1 -1
- package/unitypkg/Editor/Tools/{animation/state.cs → animator/get-state.cs} +3 -3
- package/unitypkg/Editor/Tools/{animation → animator}/play.cs +5 -5
- package/unitypkg/Editor/Tools/{animation/animator → animator}/set-enabled.cs +1 -1
- package/unitypkg/Editor/Tools/{animation/animator → animator}/set-parameter.cs +1 -1
- package/unitypkg/Editor/Tools/{animation/animator → animator}/set-speed.cs +1 -1
- package/unitypkg/Editor/Tools/{animation → animator}/stop.cs +4 -4
- package/unitypkg/Editor/Tools/{controller → animator-controller}/add-blend-tree-child.cs +10 -10
- package/unitypkg/Editor/Tools/{controller → animator-controller}/add-layer.cs +6 -6
- package/unitypkg/Editor/Tools/{controller → animator-controller}/add-parameter.cs +6 -6
- package/unitypkg/Editor/Tools/{controller → animator-controller}/add-state.cs +7 -7
- package/unitypkg/Editor/Tools/{controller → animator-controller}/add-transition.cs +9 -9
- package/unitypkg/Editor/Tools/{controller → animator-controller}/assign.cs +6 -6
- package/unitypkg/Editor/Tools/{controller → animator-controller}/create-blend-tree-1d.cs +7 -7
- package/unitypkg/Editor/Tools/{controller → animator-controller}/create-blend-tree-2d.cs +7 -7
- package/unitypkg/Editor/Tools/{controller → animator-controller}/create.cs +4 -4
- package/unitypkg/Editor/Tools/{controller → animator-controller}/get-info.cs +4 -4
- package/unitypkg/Editor/Tools/{controller → animator-controller}/remove-layer.cs +8 -8
- package/unitypkg/Editor/Tools/{controller → animator-controller}/set-layer-weight.cs +6 -6
- package/unitypkg/Editor/Tools/asset/preview.cs +1 -1
- package/unitypkg/Editor/Tools/asset/{modify.cs → write-text.cs} +6 -6
- package/unitypkg/Editor/Tools/component/get.cs +1 -1
- package/unitypkg/Editor/Tools/component/list-types.cs +2 -2
- package/unitypkg/Editor/Tools/component/modify.cs +1 -1
- package/unitypkg/Editor/Tools/component/set.cs +1 -1
- package/unitypkg/Editor/Tools/console/{get.cs → read.cs} +3 -3
- package/unitypkg/Editor/Tools/editor/{play.cs → play-mode/start.cs} +5 -5
- package/unitypkg/Editor/Tools/editor/{stop.cs → play-mode/stop.cs} +5 -5
- package/unitypkg/Editor/Tools/editor/search.cs +1 -1
- package/unitypkg/Editor/Tools/{go → game-object}/GameObjectToolSupport.cs +5 -22
- package/unitypkg/Editor/Tools/{go → game-object}/create.cs +11 -11
- package/unitypkg/Editor/Tools/{go → game-object}/delete.cs +7 -7
- package/unitypkg/Editor/Tools/{go → game-object}/duplicate.cs +6 -6
- package/unitypkg/Editor/Tools/{go → game-object}/find.cs +5 -5
- package/unitypkg/Editor/Tools/{go → game-object}/look-at.cs +8 -8
- package/unitypkg/Editor/Tools/{go → game-object}/modify.cs +9 -9
- package/unitypkg/Editor/Tools/{go → game-object}/move-relative.cs +7 -7
- package/unitypkg/Editor/Tools/{scene/move-object.cs → game-object/move-to-scene.cs} +7 -7
- package/unitypkg/Editor/Tools/{go → game-object}/set-parent.cs +9 -9
- package/unitypkg/Editor/Tools/{graphics/bake-cancel.cs → lighting/bake/cancel.cs} +4 -4
- package/unitypkg/Editor/Tools/{graphics/bake-clear.cs → lighting/bake/clear.cs} +4 -4
- package/unitypkg/Editor/Tools/{graphics/bake-reflection-probe.cs → lighting/bake/reflection-probe.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics/bake-settings.cs → lighting/bake/settings.cs} +12 -12
- package/unitypkg/Editor/Tools/{graphics/bake-start.cs → lighting/bake/start.cs} +5 -5
- package/unitypkg/Editor/Tools/{graphics/bake-status.cs → lighting/bake/status.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics → lighting}/light-probe-group.cs +7 -7
- package/unitypkg/Editor/Tools/{graphics → lighting}/reflection-probe.cs +12 -12
- package/unitypkg/Editor/Tools/{graphics/skybox-get.cs → lighting/skybox/get.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics/skybox-set-ambient.cs → lighting/skybox/set-ambient.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics/skybox-set-fog.cs → lighting/skybox/set-fog.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics/skybox-set-material.cs → lighting/skybox/set-material.cs} +5 -5
- package/unitypkg/Editor/Tools/{graphics/skybox-set-properties.cs → lighting/skybox/set-properties.cs} +5 -5
- package/unitypkg/Editor/Tools/{graphics/skybox-set-reflection.cs → lighting/skybox/set-reflection.cs} +3 -3
- package/unitypkg/Editor/Tools/{graphics/skybox-set-sun.cs → lighting/skybox/set-sun.cs} +5 -5
- package/unitypkg/Editor/Tools/{project → project-settings}/ProjectSettingsToolSupport.cs +5 -5
- package/unitypkg/Editor/Tools/{project → project-settings}/audio-settings/set.cs +3 -3
- package/unitypkg/Editor/Tools/{project → project-settings}/audio-settings.cs +4 -4
- package/unitypkg/Editor/Tools/{project → project-settings}/info.cs +4 -4
- package/unitypkg/Editor/Tools/{project → project-settings}/input-settings/set.cs +3 -3
- package/unitypkg/Editor/Tools/{project → project-settings}/input-settings.cs +4 -4
- package/unitypkg/Editor/Tools/project-settings/layer/add.cs +3 -0
- package/unitypkg/Editor/Tools/project-settings/layer/remove.cs +3 -0
- package/unitypkg/Editor/Tools/{project → project-settings}/layers.cs +4 -4
- package/unitypkg/Editor/Tools/{project → project-settings}/player-settings/set.cs +4 -4
- package/unitypkg/Editor/Tools/{project → project-settings}/player-settings.cs +4 -4
- package/unitypkg/Editor/Tools/project-settings/tag/add.cs +3 -0
- package/unitypkg/Editor/Tools/project-settings/tag/remove.cs +3 -0
- package/unitypkg/Editor/Tools/{project → project-settings}/tags.cs +4 -4
- package/unitypkg/Editor/Tools/{project → project-settings}/time-settings/set.cs +3 -3
- package/unitypkg/Editor/Tools/{project → project-settings}/time-settings.cs +4 -4
- package/unitypkg/Editor/Tools/{graphics → rendering}/GraphicsToolSupport.cs +3 -3
- package/unitypkg/Editor/Tools/rendering/pipeline/info.cs +19 -0
- package/unitypkg/Editor/Tools/{graphics/pipeline-settings.cs → rendering/pipeline/settings.cs} +4 -4
- package/unitypkg/Editor/Tools/{graphics → rendering}/quality.cs +17 -17
- package/unitypkg/Editor/Tools/{graphics → rendering}/scene-debug.cs +4 -4
- package/unitypkg/Editor/Tools/rendering/stats.cs +17 -0
- package/unitypkg/Editor/Tools/{reflection → runtime-reflection}/method/find.cs +5 -5
- package/unitypkg/Editor/Tools/{reflection/method/call.cs → runtime-reflection/method/invoke.cs} +7 -7
- package/unitypkg/Editor/Tools/{reflection → runtime-reflection}/type/schema.cs +5 -5
- package/unitypkg/Editor/Tools/scene/gameobject-support.cs +1 -1
- package/unitypkg/Editor/Tools/scene/gameobject.cs +1 -1
- package/unitypkg/Editor/Tools/scene/hierarchy.cs +1 -1
- package/unitypkg/Editor/Tools/{camera/screenshot.cs → screenshot/from-camera.cs} +4 -4
- package/unitypkg/Editor/Tools/{object/modify.cs → serialized-object/patch.cs} +8 -8
- package/unitypkg/Editor/Tools/{object/get-data.cs → serialized-object/read.cs} +4 -4
- package/unitypkg/Editor/Tools/{graphics/volume.cs → volume/list.cs} +3 -3
- package/unitypkg/Editor/UnityCliBridge.cs +3 -22
- package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeBridge.cs +15 -15
- package/unitypkg/Runtime/Infrastructure/UnityCliRuntimeRegistry.cs +1 -1
- package/unitypkg/Runtime/Tools/UnityCliRuntimeTools.cs +22 -22
- package/unitypkg/Shared/UnityCliBridgeQueuePolicy.cs +1 -1
- package/unitypkg/Tests/Editor/UnityCliAdmissionCoordinatorIntegrationTests.cs +7 -7
- package/unitypkg/Tests/Editor/UnityCliBridgeAdmissionIntegrationTests.cs +6 -6
- package/unitypkg/Tests/Editor/UnityCliBridgeQueuePolicyTests.cs +3 -3
- package/unitypkg/Tests/Editor/UnityCliContinuationIntegrationTests.cs +1 -1
- package/unitypkg/Tests/Editor/UnityCliRequestBudgetTests.cs +4 -4
- package/unitypkg/Tests/Editor/UnityCliRuntimeBridgeIntegrationTests.cs +15 -15
- package/unitypkg/Tests/Runtime/UnityCliRuntimeCatalogValidationTests.cs +5 -5
- package/unitypkg/package.json +1 -1
- package/dist/bridge/domains/graphics.d.ts +0 -2
- package/dist/bridge/domains/graphics.js +0 -170
- package/dist/bridge/domains/graphics.js.map +0 -1
- package/dist/bridge/domains/object.d.ts +0 -2
- package/dist/bridge/domains/object.js.map +0 -1
- package/dist/bridge/domains/package.d.ts +0 -2
- package/dist/bridge/domains/package.js +0 -2
- package/dist/bridge/domains/package.js.map +0 -1
- package/dist/bridge/domains/project-tool.d.ts +0 -2
- package/dist/bridge/domains/project-tool.js.map +0 -1
- package/dist/bridge/domains/reflection.d.ts +0 -2
- package/dist/bridge/domains/reflection.js.map +0 -1
- package/dist/bridge/domains/runtime-tool.d.ts +0 -2
- package/dist/bridge/domains/runtime-tool.js.map +0 -1
- package/dist/tools/code/exec.js.map +0 -1
- package/dist/tools/reflect/member.js.map +0 -1
- package/dist/tools/reflect/search.js.map +0 -1
- package/dist/tools/reflect/type.js.map +0 -1
- package/dist/tools/runtime/console.js.map +0 -1
- package/dist/tools/runtime/input/key.js.map +0 -1
- package/dist/tools/runtime/input/pointer.js.map +0 -1
- package/dist/tools/runtime/log.js.map +0 -1
- package/dist/tools/runtime/state.js.map +0 -1
- package/dist/tools/runtime/target-framerate/set.js.map +0 -1
- package/dist/tools/runtime/time-scale/set.js.map +0 -1
- package/dist/tools/runtime/ui/capture-element.js.map +0 -1
- package/unitypkg/Editor/Tools/graphics/pipeline-info.cs +0 -19
- package/unitypkg/Editor/Tools/graphics/stats.cs +0 -17
- package/unitypkg/Editor/Tools/project/layer/add.cs +0 -3
- package/unitypkg/Editor/Tools/project/layer/remove.cs +0 -3
- package/unitypkg/Editor/Tools/project/tag/add.cs +0 -3
- package/unitypkg/Editor/Tools/project/tag/remove.cs +0 -3
- /package/dist/tools/{runtime → player-runtime}/console.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/input/key.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/input/pointer.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/log.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/state.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/target-framerate/set.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/time-scale/set.d.ts +0 -0
- /package/dist/tools/{runtime → player-runtime}/ui/capture-element.d.ts +0 -0
- /package/dist/tools/{reflect/member.d.ts → type-inspection/get-member.d.ts} +0 -0
- /package/dist/tools/{reflect/type.d.ts → type-inspection/get-type.d.ts} +0 -0
- /package/dist/tools/{reflect → type-inspection}/search.d.ts +0 -0
- /package/unitypkg/Editor/Tools/{animation → animator}/AnimatorRuntimeToolSupport.cs +0 -0
- /package/unitypkg/Editor/Tools/{project → project-settings}/ProjectSettingsReader.cs +0 -0
- /package/unitypkg/Editor/Tools/{project → project-settings}/ProjectTagLayerToolSupport.cs +0 -0
- /package/unitypkg/Editor/Tools/{object → serialized-object}/ObjectToolSupport.cs +0 -0
|
@@ -6,9 +6,9 @@ using UnityEditor;
|
|
|
6
6
|
namespace UnityCli
|
|
7
7
|
{
|
|
8
8
|
/// <summary>
|
|
9
|
-
/// asset.
|
|
9
|
+
/// asset.write-text — 用新 content 覆盖文本类资产文件并重新导入。
|
|
10
10
|
/// </summary>
|
|
11
|
-
public class
|
|
11
|
+
public class AssetWriteTextTool : IUnityCliTool<AssetWriteTextTool.Request, AssetWriteTextTool.Result>
|
|
12
12
|
{
|
|
13
13
|
public sealed class Request
|
|
14
14
|
{
|
|
@@ -24,7 +24,7 @@ namespace UnityCli
|
|
|
24
24
|
|
|
25
25
|
public ToolDescriptor Describe() => new()
|
|
26
26
|
{
|
|
27
|
-
Name = "asset.
|
|
27
|
+
Name = "asset.write-text",
|
|
28
28
|
Summary = "Overwrite a text-like asset file with new content and force-reimport it.",
|
|
29
29
|
Description = "Overwrite a text-like asset file with new content and force-reimport it. The asset must already exist. Use asset.create for new files and asset.import for binary source files.",
|
|
30
30
|
Group = "asset",
|
|
@@ -42,13 +42,13 @@ namespace UnityCli
|
|
|
42
42
|
|
|
43
43
|
public System.Threading.Tasks.ValueTask<Result> ExecuteAsync(Request request, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
44
44
|
{
|
|
45
|
-
AssetToolSupport.EnsureEditorNotBusy("asset.
|
|
45
|
+
AssetToolSupport.EnsureEditorNotBusy("asset.write-text");
|
|
46
46
|
var path = AssetToolSupport.RequireExistingAssetPath(request.Path);
|
|
47
47
|
var content = request.Content;
|
|
48
48
|
var extension = Path.GetExtension(path).ToLowerInvariant();
|
|
49
49
|
var textExtensions = new HashSet<string> { ".txt", ".json", ".xml", ".csv", ".md", ".yaml", ".yml", ".uss", ".uxml", ".shader", ".cginc", ".compute", ".asmdef", ".asmref" };
|
|
50
50
|
if (!textExtensions.Contains(extension) || Directory.Exists(AssetToolSupport.AssetFullPath(path)))
|
|
51
|
-
throw new UnityCliBridge.BridgeCommandException("E_ASSET_MODIFY_TYPE_UNSUPPORTED", "asset.
|
|
51
|
+
throw new UnityCliBridge.BridgeCommandException("E_ASSET_MODIFY_TYPE_UNSUPPORTED", "asset.write-text only supports existing ordinary text files with a safe extension: " + path, "Use an approved text extension or the specialized asset tool.");
|
|
52
52
|
if (content == null)
|
|
53
53
|
{
|
|
54
54
|
throw new UnityCliBridge.BridgeCommandException("E_ASSET_CONTENT_REQUIRED", "Asset modify requires content or content-file.", "Pass text content for a text-like asset file.");
|
|
@@ -61,7 +61,7 @@ namespace UnityCli
|
|
|
61
61
|
return new System.Threading.Tasks.ValueTask<Result>(new Result
|
|
62
62
|
{
|
|
63
63
|
Asset = AssetToolSupport.BuildAssetDetail(path),
|
|
64
|
-
PlannedEffects = new List<AssetPlannedEffect> { new AssetPlannedEffect { Type = "asset.
|
|
64
|
+
PlannedEffects = new List<AssetPlannedEffect> { new AssetPlannedEffect { Type = "asset.write-text", Path = path } }
|
|
65
65
|
});
|
|
66
66
|
}
|
|
67
67
|
}
|
|
@@ -43,7 +43,7 @@ namespace UnityCli
|
|
|
43
43
|
{
|
|
44
44
|
Name = "component.get",
|
|
45
45
|
Summary = "Deep-read one Component by GameObject and component selector; use paths/viewQuery for token-safe fields.",
|
|
46
|
-
Description = "Deep-read one Component after selecting a GameObject with
|
|
46
|
+
Description = "Deep-read one Component after selecting a GameObject with game-object.find, scene.hierarchy, scene.gameobject, or scene.gameobject.components. For token safety, pass exact paths or one viewQuery; they are mutually exclusive and skip full fields/props expansion. Use componentIndex/componentInstanceId when duplicate components exist. maxDepth is 0..16, maxArrayItems is 1..1000, and paths accepts at most 128 ordered exact reads. All reads share budget scan/node/getter/reflection/time/UTF-8 ceilings; truncated nodes return nextPath. Defaults are 10000 scans, 4096 nodes, 2048 getters, 4096 reflection calls, 250 main-thread ms, and 1 MiB; maxima are 100000/20000/10000/20000/2000 ms/8 MiB. Read-only in Edit and Play Mode.",
|
|
47
47
|
Group = "component",
|
|
48
48
|
DestructiveHint = false,
|
|
49
49
|
Target = "editor",
|
|
@@ -25,7 +25,7 @@ namespace UnityCli
|
|
|
25
25
|
{
|
|
26
26
|
public long Count { get; set; }
|
|
27
27
|
public List<ComponentTypeInfo> Types { get; set; }
|
|
28
|
-
public
|
|
28
|
+
public GameObjectPageInfo PageInfo { get; set; }
|
|
29
29
|
}
|
|
30
30
|
|
|
31
31
|
public ToolDescriptor Describe() => new()
|
|
@@ -72,7 +72,7 @@ namespace UnityCli
|
|
|
72
72
|
{
|
|
73
73
|
Count = total,
|
|
74
74
|
Types = page.ConvertAll(t => new ComponentTypeInfo { FullName = t.FullName, Name = t.Name, Assembly = t.Assembly.GetName().Name, Namespace = t.Namespace }),
|
|
75
|
-
PageInfo = new
|
|
75
|
+
PageInfo = new GameObjectPageInfo { PageSize = pageSize, Cursor = cursor, NextCursor = nextCursor, Total = total }
|
|
76
76
|
};
|
|
77
77
|
return new System.Threading.Tasks.ValueTask<Result>(result);
|
|
78
78
|
}
|
|
@@ -41,7 +41,7 @@ namespace UnityCli
|
|
|
41
41
|
public ToolDescriptor Describe() => new()
|
|
42
42
|
{
|
|
43
43
|
Name = "component.modify",
|
|
44
|
-
Summary = "Modify one Component with verified serialized pathPatches; use component.get/type.schema first.",
|
|
44
|
+
Summary = "Modify one Component with verified serialized pathPatches; use component.get/runtime-reflection.type.schema first.",
|
|
45
45
|
Description = "Apply direct replace pathPatches to verifiable SerializedProperties of one Component. Returns fresh updated data and changed paths. Use component.get first. In Play Mode, scene component changes affect only the current runtime session unless later persisted by Unity workflow; in Edit Mode they mark scene/component state dirty.",
|
|
46
46
|
Group = "component",
|
|
47
47
|
DestructiveHint = true,
|
|
@@ -33,7 +33,7 @@ namespace UnityCli
|
|
|
33
33
|
{
|
|
34
34
|
Name = "component.set",
|
|
35
35
|
Summary = "Set one simple public field/property, or multiple simple fields/properties via properties, on a Component attached to a GameObject.",
|
|
36
|
-
Description = "Set one simple public field/property, or multiple simple fields/properties via properties, on a Component attached to a GameObject. For nested values, object references, arrays, or SerializedObject-style patches, use component.modify after component.get/type.schema.",
|
|
36
|
+
Description = "Set one simple public field/property, or multiple simple fields/properties via properties, on a Component attached to a GameObject. For nested values, object references, arrays, or SerializedObject-style patches, use component.modify after component.get/runtime-reflection.type.schema.",
|
|
37
37
|
Group = "component",
|
|
38
38
|
DestructiveHint = false,
|
|
39
39
|
SideEffects = new[] { "component-modify", "scene-modify" },
|
|
@@ -3,8 +3,8 @@ using System.Collections.Generic;
|
|
|
3
3
|
|
|
4
4
|
namespace UnityCli
|
|
5
5
|
{
|
|
6
|
-
/// <summary>console.
|
|
7
|
-
public class
|
|
6
|
+
/// <summary>console.read — 按稳定 raw Console 位置执行有界过滤与续页。</summary>
|
|
7
|
+
public class ConsoleReadTool : IUnityCliTool<ConsoleReadTool.Request, ConsoleReadTool.Result>
|
|
8
8
|
{
|
|
9
9
|
public sealed class Request
|
|
10
10
|
{
|
|
@@ -26,7 +26,7 @@ namespace UnityCli
|
|
|
26
26
|
|
|
27
27
|
public ToolDescriptor Describe() => new()
|
|
28
28
|
{
|
|
29
|
-
Name = "console.
|
|
29
|
+
Name = "console.read",
|
|
30
30
|
Summary = "Read one bounded, non-resumable Unity Console snapshot under request-wide limits.",
|
|
31
31
|
Description = "Read Console entries newest-first from one Unity snapshot window without materializing the Console. count defaults to 50 and is limited to 1..500. Filtering advances over raw positions and every entry uses the shared scan/reflection/getter/main-thread/UTF-8 budget. Unity exposes no reliable generation covering external Console clear/rebuild, so this tool intentionally has no cursor; truncated=true means start a fresh snapshot with a larger count or budget. rawEntryCount is Unity's raw count, not a filtered total. Read-only in Edit and Play Mode.",
|
|
32
32
|
Group = "console",
|
|
@@ -7,17 +7,17 @@ using UnityEngine.SceneManagement;
|
|
|
7
7
|
|
|
8
8
|
namespace UnityCli
|
|
9
9
|
{
|
|
10
|
-
/// <summary>editor.play — 进入 Play Mode。</summary>
|
|
11
|
-
public class
|
|
10
|
+
/// <summary>editor.play-mode.start — 进入 Play Mode。</summary>
|
|
11
|
+
public class EditorPlayModeStartTool : IUnityCliTool<EditorPlayModeStartTool.Request, EditorPlayModeStartTool.Response>
|
|
12
12
|
{
|
|
13
13
|
public sealed class Request { }
|
|
14
14
|
public sealed class Response { public PlayModeResult Result { get; set; } public EditorStateInfo State { get; set; } public List<EditorPlannedEffect> PlannedEffects { get; set; } }
|
|
15
|
-
public ToolDescriptor Describe() => new() { Name = "editor.play", Summary = "Enter Unity Play Mode and return only after the Editor reaches a stable playing state.", Description = "Set EditorApplication.isPlaying=true, absorb the PlayMode transition or same-session reload, and return the stable Editor state. Success proves isPlaying=true and the central PlayMode transition flag is false.", Group = "editor",DestructiveHint = false, SideEffects = new[] { "session-affecting" }, Target = "editor", PlayModeSupport = "supported", DefaultTimeoutMs = 30000, MaxTimeoutMs = 600000, Examples = new[] { new ToolExample { Description = "Enter play mode", Input = new Request { } } } };
|
|
15
|
+
public ToolDescriptor Describe() => new() { Name = "editor.play-mode.start", Summary = "Enter Unity Play Mode and return only after the Editor reaches a stable playing state.", Description = "Set EditorApplication.isPlaying=true, absorb the PlayMode transition or same-session reload, and return the stable Editor state. Success proves isPlaying=true and the central PlayMode transition flag is false.", Group = "editor",DestructiveHint = false, SideEffects = new[] { "session-affecting" }, Target = "editor", PlayModeSupport = "supported", DefaultTimeoutMs = 30000, MaxTimeoutMs = 600000, Examples = new[] { new ToolExample { Description = "Enter play mode", Input = new Request { } } } };
|
|
16
16
|
public async System.Threading.Tasks.ValueTask<Response> ExecuteAsync(Request r, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
17
17
|
{
|
|
18
18
|
// 首次effect前状态由固定direct root持久化;Tool重入不再创建逐请求SessionState键。
|
|
19
19
|
var before = EditorApplication.isPlaying;
|
|
20
|
-
EditorToolSupport.EnsureEditorNotBusy("editor.play");
|
|
20
|
+
EditorToolSupport.EnsureEditorNotBusy("editor.play-mode.start");
|
|
21
21
|
ctx.CommitEffect();
|
|
22
22
|
EditorApplication.isPaused = false;
|
|
23
23
|
EditorApplication.isPlaying = true;
|
|
@@ -27,7 +27,7 @@ namespace UnityCli
|
|
|
27
27
|
ct: ct);
|
|
28
28
|
if (!stable || !EditorApplication.isPlaying || UnityCliBridge.IsPlayModeChanging())
|
|
29
29
|
throw new UnityCliBridge.BridgeCommandException("E_PLAY_MODE_TERMINAL_NOT_OBSERVED", "Play Mode did not reach a stable playing state.", "Inspect editor.state before deciding whether to submit a new request.");
|
|
30
|
-
return new Response { Result = new PlayModeResult { Changed = !before, IsPlaying = true, IsPaused = EditorApplication.isPaused }, State = EditorToolSupport.BuildEditorState(), PlannedEffects = new List<EditorPlannedEffect> { new EditorPlannedEffect { Type = "editor.play" } } };
|
|
30
|
+
return new Response { Result = new PlayModeResult { Changed = !before, IsPlaying = true, IsPaused = EditorApplication.isPaused }, State = EditorToolSupport.BuildEditorState(), PlannedEffects = new List<EditorPlannedEffect> { new EditorPlannedEffect { Type = "editor.play-mode.start" } } };
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -7,17 +7,17 @@ using UnityEngine.SceneManagement;
|
|
|
7
7
|
|
|
8
8
|
namespace UnityCli
|
|
9
9
|
{
|
|
10
|
-
/// <summary>editor.stop — 退出 Play Mode。</summary>
|
|
11
|
-
public class
|
|
10
|
+
/// <summary>editor.play-mode.stop — 退出 Play Mode。</summary>
|
|
11
|
+
public class EditorPlayModeStopTool : IUnityCliTool<EditorPlayModeStopTool.Request, EditorPlayModeStopTool.Response>
|
|
12
12
|
{
|
|
13
13
|
public sealed class Request { }
|
|
14
14
|
public sealed class Response { public PlayModeResult Result { get; set; } public EditorStateInfo State { get; set; } public List<EditorPlannedEffect> PlannedEffects { get; set; } }
|
|
15
|
-
public ToolDescriptor Describe() => new() { Name = "editor.stop", Summary = "Exit Unity Play Mode and return only after the Editor reaches stable Edit Mode.", Description = "Set EditorApplication.isPlaying=false, absorb the PlayMode transition or same-session reload, and return the stable Editor state. Success proves isPlaying=false and the central PlayMode transition flag is false.", Group = "editor",DestructiveHint = false, SideEffects = new[] { "session-affecting" }, Target = "editor", PlayModeSupport = "supported", DefaultTimeoutMs = 30000, MaxTimeoutMs = 600000, Examples = new[] { new ToolExample { Description = "Exit play mode", Input = new Request { } } } };
|
|
15
|
+
public ToolDescriptor Describe() => new() { Name = "editor.play-mode.stop", Summary = "Exit Unity Play Mode and return only after the Editor reaches stable Edit Mode.", Description = "Set EditorApplication.isPlaying=false, absorb the PlayMode transition or same-session reload, and return the stable Editor state. Success proves isPlaying=false and the central PlayMode transition flag is false.", Group = "editor",DestructiveHint = false, SideEffects = new[] { "session-affecting" }, Target = "editor", PlayModeSupport = "supported", DefaultTimeoutMs = 30000, MaxTimeoutMs = 600000, Examples = new[] { new ToolExample { Description = "Exit play mode", Input = new Request { } } } };
|
|
16
16
|
public async System.Threading.Tasks.ValueTask<Response> ExecuteAsync(Request r, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
17
17
|
{
|
|
18
18
|
// 首次effect前状态由固定direct root持久化;Tool重入不再创建逐请求SessionState键。
|
|
19
19
|
var before = EditorApplication.isPlaying;
|
|
20
|
-
EditorToolSupport.EnsureEditorNotBusy("editor.stop");
|
|
20
|
+
EditorToolSupport.EnsureEditorNotBusy("editor.play-mode.stop");
|
|
21
21
|
ctx.CommitEffect();
|
|
22
22
|
EditorApplication.isPaused = false;
|
|
23
23
|
EditorApplication.isPlaying = false;
|
|
@@ -27,7 +27,7 @@ namespace UnityCli
|
|
|
27
27
|
ct: ct);
|
|
28
28
|
if (!stable || EditorApplication.isPlaying || UnityCliBridge.IsPlayModeChanging())
|
|
29
29
|
throw new UnityCliBridge.BridgeCommandException("E_EDIT_MODE_TERMINAL_NOT_OBSERVED", "The Editor did not reach stable Edit Mode.", "Inspect editor.state before deciding whether to submit a new request.");
|
|
30
|
-
return new Response { Result = new PlayModeResult { Changed = before, IsPlaying = false, IsPaused = false }, State = EditorToolSupport.BuildEditorState(), PlannedEffects = new List<EditorPlannedEffect> { new EditorPlannedEffect { Type = "editor.stop" } } };
|
|
30
|
+
return new Response { Result = new PlayModeResult { Changed = before, IsPlaying = false, IsPaused = false }, State = EditorToolSupport.BuildEditorState(), PlannedEffects = new List<EditorPlannedEffect> { new EditorPlannedEffect { Type = "editor.play-mode.stop" } } };
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -10,7 +10,7 @@ namespace UnityCli
|
|
|
10
10
|
{
|
|
11
11
|
Name = "editor.search",
|
|
12
12
|
Summary = "Run a bounded Unity Search query with explicit provider metadata and paging.",
|
|
13
|
-
Description = "Uses UnityEditor.Search directly across active Unity Search providers. providers accepts at most 16 exact active provider IDs; omission uses the active provider set. offset accepts 0..10000 and limit defaults to 50 with a maximum of 200. At most offset+limit+1 items are scanned and only the requested page is retained. This is provider-level Unity Search, not an alias for asset.search or
|
|
13
|
+
Description = "Uses UnityEditor.Search directly across active Unity Search providers. providers accepts at most 16 exact active provider IDs; omission uses the active provider set. offset accepts 0..10000 and limit defaults to 50 with a maximum of 200. At most offset+limit+1 items are scanned and only the requested page is retained. This is provider-level Unity Search, not an alias for asset.search or game-object.find.",
|
|
14
14
|
Group = "editor",
|
|
15
15
|
DestructiveHint = false,
|
|
16
16
|
SupportsDryRun = false,
|
|
@@ -64,14 +64,14 @@ namespace UnityCli
|
|
|
64
64
|
return options;
|
|
65
65
|
}
|
|
66
66
|
|
|
67
|
-
// ─── 变更校验与应用(复刻
|
|
67
|
+
// ─── 变更校验与应用(复刻 game-object.create/modify 的 ApplyGameObjectMutations/ValidateGameObjectMutationInputs) ──
|
|
68
68
|
|
|
69
69
|
/// <summary>校验 tag/layer 输入是否有效,无效抛 BridgeCommandException。</summary>
|
|
70
70
|
public static void ValidateMutationInputs(string tagValue, string layerValue)
|
|
71
71
|
{
|
|
72
72
|
if (!string.IsNullOrEmpty(tagValue) && !IsKnownTag(tagValue))
|
|
73
73
|
{
|
|
74
|
-
throw new UnityCliBridge.BridgeCommandException("E_TAG_NOT_FOUND", "Tag not found: " + tagValue, "Create the tag first with project.tag.add or pass an existing Unity tag.");
|
|
74
|
+
throw new UnityCliBridge.BridgeCommandException("E_TAG_NOT_FOUND", "Tag not found: " + tagValue, "Create the tag first with project-settings.tag.add or pass an existing Unity tag.");
|
|
75
75
|
}
|
|
76
76
|
if (!string.IsNullOrEmpty(layerValue)) ParseLayer(layerValue);
|
|
77
77
|
}
|
|
@@ -425,7 +425,7 @@ namespace UnityCli
|
|
|
425
425
|
{
|
|
426
426
|
return new ComponentPropertyChange(propertyName, ConvertComponentValue(value, field.FieldType), field.FieldType, null, field, value);
|
|
427
427
|
}
|
|
428
|
-
throw new UnityCliBridge.BridgeCommandException("E_COMPONENT_PROPERTY_NOT_FOUND", "Writable component property not found: " + propertyName, "Use component.get or type.schema to inspect writable public fields/properties.");
|
|
428
|
+
throw new UnityCliBridge.BridgeCommandException("E_COMPONENT_PROPERTY_NOT_FOUND", "Writable component property not found: " + propertyName, "Use component.get or runtime-reflection.type.schema to inspect writable public fields/properties.");
|
|
429
429
|
}
|
|
430
430
|
|
|
431
431
|
public static void ApplyComponentPropertyChanges(Component component, List<ComponentPropertyChange> changes)
|
|
@@ -456,7 +456,7 @@ namespace UnityCli
|
|
|
456
456
|
throw new UnityCliBridge.BridgeCommandException(
|
|
457
457
|
"E_COMPONENT_VALUE_INVALID",
|
|
458
458
|
"Component value could not be converted to " + type.Name + ": " + exception.Message,
|
|
459
|
-
"Pass a JSON value matching the writable member type shown by component.get or type.schema.");
|
|
459
|
+
"Pass a JSON value matching the writable member type shown by component.get or runtime-reflection.type.schema.");
|
|
460
460
|
}
|
|
461
461
|
}
|
|
462
462
|
|
|
@@ -545,25 +545,8 @@ namespace UnityCli
|
|
|
545
545
|
public string SideEffects { get; set; }
|
|
546
546
|
}
|
|
547
547
|
|
|
548
|
-
/// <summary>层级搜索结果项。</summary>
|
|
549
|
-
public sealed class GoFindItem
|
|
550
|
-
{
|
|
551
|
-
public long Id { get; set; }
|
|
552
|
-
public string Name { get; set; }
|
|
553
|
-
public string Path { get; set; }
|
|
554
|
-
public bool Active { get; set; }
|
|
555
|
-
public bool ActiveInHierarchy { get; set; }
|
|
556
|
-
public string Tag { get; set; }
|
|
557
|
-
public long Layer { get; set; }
|
|
558
|
-
public long ChildCount { get; set; }
|
|
559
|
-
public bool ChildrenTruncated { get; set; }
|
|
560
|
-
public long ComponentCount { get; set; }
|
|
561
|
-
public List<string> ComponentTypes { get; set; }
|
|
562
|
-
public List<string> Components { get; set; }
|
|
563
|
-
}
|
|
564
|
-
|
|
565
548
|
/// <summary>分页信息。</summary>
|
|
566
|
-
public sealed class
|
|
549
|
+
public sealed class GameObjectPageInfo
|
|
567
550
|
{
|
|
568
551
|
public long PageSize { get; set; }
|
|
569
552
|
public long Cursor { get; set; }
|
|
@@ -81,10 +81,10 @@ namespace UnityCli
|
|
|
81
81
|
|
|
82
82
|
public ToolDescriptor Describe() => new()
|
|
83
83
|
{
|
|
84
|
-
Name = "
|
|
84
|
+
Name = "game-object.create",
|
|
85
85
|
Summary = "Create one or up to 1000 scene GameObjects in one call, with optional primitive, parent, and per-object local transforms.",
|
|
86
86
|
Description = "count defaults to 1. For a batch, positions/rotations/scales are optional arrays of exactly count [x,y,z] vectors; scalar transform fields remain the single-object form. The parent and every input are resolved before one effect barrier. Success returns the complete ordered object set from fresh instance-id readback.",
|
|
87
|
-
Group = "
|
|
87
|
+
Group = "game-object",
|
|
88
88
|
DestructiveHint = false,
|
|
89
89
|
SideEffects = new[] { "scene-modify", "undo-stack" },
|
|
90
90
|
Target = "editor",
|
|
@@ -112,14 +112,14 @@ namespace UnityCli
|
|
|
112
112
|
/// <summary>整批预检后跨越唯一 effect barrier,在一个 Undo group 中创建并 fresh 证明完整集合。</summary>
|
|
113
113
|
public System.Threading.Tasks.ValueTask<Result> ExecuteAsync(Request request, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default(System.Threading.CancellationToken))
|
|
114
114
|
{
|
|
115
|
-
GameObjectToolSupport.EnsureEditorNotBusy("
|
|
115
|
+
GameObjectToolSupport.EnsureEditorNotBusy("game-object.create");
|
|
116
116
|
ct.ThrowIfCancellationRequested();
|
|
117
117
|
var plan = Prepare(request ?? new Request());
|
|
118
118
|
|
|
119
119
|
ct.ThrowIfCancellationRequested();
|
|
120
120
|
ctx.CommitEffect();
|
|
121
121
|
var instanceIds = new List<int>(plan.Count);
|
|
122
|
-
var undoGroup = UnityCliSceneMutation.BeginUndoGroup("
|
|
122
|
+
var undoGroup = UnityCliSceneMutation.BeginUndoGroup("game-object.create");
|
|
123
123
|
try
|
|
124
124
|
{
|
|
125
125
|
foreach (var item in plan.Items)
|
|
@@ -132,7 +132,7 @@ namespace UnityCli
|
|
|
132
132
|
GameObjectToolSupport.ApplyGameObjectMutations(gameObject, null, plan.Active, plan.TagValue, plan.LayerValue,
|
|
133
133
|
item.X, item.Y, item.Z, item.RotationX, item.RotationY, item.RotationZ, item.ScaleX, item.ScaleY, item.ScaleZ);
|
|
134
134
|
ApplyLocalTransforms(gameObject.transform, item);
|
|
135
|
-
UnityCliSceneMutation.RegisterCreatedObject(gameObject, "
|
|
135
|
+
UnityCliSceneMutation.RegisterCreatedObject(gameObject, "game-object.create");
|
|
136
136
|
UnityCliSceneMutation.MarkSceneDirty(gameObject.scene);
|
|
137
137
|
instanceIds.Add(gameObject.GetInstanceID());
|
|
138
138
|
}
|
|
@@ -151,7 +151,7 @@ namespace UnityCli
|
|
|
151
151
|
GameObjects = observed,
|
|
152
152
|
PlannedEffects = new List<PlannedEffect>
|
|
153
153
|
{
|
|
154
|
-
new PlannedEffect { Type = "
|
|
154
|
+
new PlannedEffect { Type = "game-object.create", Count = observed.Count, Parent = parentPath, Target = parentPath ?? "<scene-root>" }
|
|
155
155
|
}
|
|
156
156
|
});
|
|
157
157
|
}
|
|
@@ -161,7 +161,7 @@ namespace UnityCli
|
|
|
161
161
|
{
|
|
162
162
|
var count = request.Count ?? 1;
|
|
163
163
|
if (count < 1 || count > MaxBatchCount)
|
|
164
|
-
throw Error("E_GO_BATCH_COUNT_INVALID", "
|
|
164
|
+
throw Error("E_GO_BATCH_COUNT_INVALID", "game-object.create count must be between 1 and " + MaxBatchCount + ".", "count", count);
|
|
165
165
|
ValidateVectorArray(request.Positions, count, "positions");
|
|
166
166
|
ValidateVectorArray(request.Rotations, count, "rotations");
|
|
167
167
|
ValidateVectorArray(request.Scales, count, "scales");
|
|
@@ -180,7 +180,7 @@ namespace UnityCli
|
|
|
180
180
|
: GameObjectToolSupport.ParsePrimitiveType(request.Primitive);
|
|
181
181
|
var baseName = request.Name ?? request.Target ?? "GameObject";
|
|
182
182
|
if (string.IsNullOrWhiteSpace(baseName))
|
|
183
|
-
throw Error("E_GO_CREATE_NAME_INVALID", "
|
|
183
|
+
throw Error("E_GO_CREATE_NAME_INVALID", "game-object.create name must not be empty or whitespace.", "name", null);
|
|
184
184
|
|
|
185
185
|
var items = new List<CreateItemPlan>(count);
|
|
186
186
|
for (var index = 0; index < count; index++)
|
|
@@ -261,13 +261,13 @@ namespace UnityCli
|
|
|
261
261
|
private static List<GameObjectDetail> Prove(CreatePlan plan, List<int> instanceIds)
|
|
262
262
|
{
|
|
263
263
|
if (instanceIds.Count != plan.Count)
|
|
264
|
-
throw Error("E_GO_CREATE_SET_MISMATCH", "
|
|
264
|
+
throw Error("E_GO_CREATE_SET_MISMATCH", "game-object.create did not produce the requested object count.", "count", instanceIds.Count);
|
|
265
265
|
var uniqueIds = new HashSet<int>();
|
|
266
266
|
var result = new List<GameObjectDetail>(plan.Count);
|
|
267
267
|
for (var index = 0; index < instanceIds.Count; index++)
|
|
268
268
|
{
|
|
269
269
|
if (!uniqueIds.Add(instanceIds[index]))
|
|
270
|
-
throw Error("E_GO_CREATE_SET_MISMATCH", "
|
|
270
|
+
throw Error("E_GO_CREATE_SET_MISMATCH", "game-object.create returned a duplicate object identity.", "instanceId", instanceIds[index]);
|
|
271
271
|
var observed = EditorUtility.InstanceIDToObject(instanceIds[index]) as GameObject;
|
|
272
272
|
var expected = plan.Items[index];
|
|
273
273
|
if (observed == null || !observed.scene.IsValid() || !observed.scene.isLoaded
|
|
@@ -326,7 +326,7 @@ namespace UnityCli
|
|
|
326
326
|
code,
|
|
327
327
|
message,
|
|
328
328
|
new Dictionary<string, object> { { "field", field }, { "actual", actual } },
|
|
329
|
-
new[] { "Inspect tools describe
|
|
329
|
+
new[] { "Inspect tools describe game-object.create and submit one valid single-object or batch request." });
|
|
330
330
|
}
|
|
331
331
|
}
|
|
332
332
|
}
|
|
@@ -4,7 +4,7 @@ using System.Collections.Generic;
|
|
|
4
4
|
namespace UnityCli
|
|
5
5
|
{
|
|
6
6
|
/// <summary>
|
|
7
|
-
///
|
|
7
|
+
/// game-object.delete — 从场景删除单个 GameObject(递归删除子级)。支持 dryRun 预览。
|
|
8
8
|
/// </summary>
|
|
9
9
|
public class GameObjectDeleteTool : IUnityCliTool<GameObjectDeleteTool.Request, GameObjectDeleteTool.Result>
|
|
10
10
|
{
|
|
@@ -23,10 +23,10 @@ namespace UnityCli
|
|
|
23
23
|
|
|
24
24
|
public ToolDescriptor Describe() => new()
|
|
25
25
|
{
|
|
26
|
-
Name = "
|
|
26
|
+
Name = "game-object.delete",
|
|
27
27
|
Summary = "Delete one scene GameObject; EditMode stays dirty, and final PlayMode proof requires reading editor.state.",
|
|
28
28
|
Description = "Delete one GameObject from the current scene/session and recursively remove its children. Dry-run returns target with destroyed=false. Live execution returns deleted with destroyed=true only after the target no longer exists; Play Mode scene instances are destroyed synchronously before the command returns. In EditMode, deletion adds shared Undo history and intentionally leaves the scene dirty. If a task started from a clean scene and must discard all temporary in-memory changes without saving, finish business verification, delete the temporary object, then call scene.load once with the exact active scene path; do not probe or repeat editor.undo when pre-existing Undo history is unknown. When final PlayMode is a task requirement, read the editor.state Context after cleanup. Prefer hierarchy paths or instance ids when plain names may be ambiguous.",
|
|
29
|
-
Group = "
|
|
29
|
+
Group = "game-object",
|
|
30
30
|
DestructiveHint = false,
|
|
31
31
|
SupportsDryRun = true,
|
|
32
32
|
SideEffects = new[] { "scene-modify", "undo-stack", "recursive-delete" },
|
|
@@ -43,7 +43,7 @@ namespace UnityCli
|
|
|
43
43
|
|
|
44
44
|
public System.Threading.Tasks.ValueTask<Result> ExecuteAsync(Request request, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
45
45
|
{
|
|
46
|
-
GameObjectToolSupport.EnsureEditorNotBusy("
|
|
46
|
+
GameObjectToolSupport.EnsureEditorNotBusy("game-object.delete");
|
|
47
47
|
if (string.IsNullOrEmpty(request.Target))
|
|
48
48
|
{
|
|
49
49
|
throw new UnityCliBridge.BridgeCommandException("E_TARGET_NOT_FOUND", "GameObject delete requires a target.", "Pass a GameObject name, hierarchy path or instance id.");
|
|
@@ -56,7 +56,7 @@ namespace UnityCli
|
|
|
56
56
|
{
|
|
57
57
|
DryRun = true,
|
|
58
58
|
Destroyed = false,
|
|
59
|
-
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "
|
|
59
|
+
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "game-object.delete", Target = targetRef.Path, SideEffects = "none" } }
|
|
60
60
|
});
|
|
61
61
|
}
|
|
62
62
|
var scene = gameObject.scene;
|
|
@@ -72,14 +72,14 @@ namespace UnityCli
|
|
|
72
72
|
{ "target", targetRef.Path },
|
|
73
73
|
{ "instanceId", targetRef.Id }
|
|
74
74
|
},
|
|
75
|
-
new[] { "Run tools run scene.gameobject for the target and inspect console.
|
|
75
|
+
new[] { "Run tools run scene.gameobject for the target and inspect console.read before retrying." });
|
|
76
76
|
}
|
|
77
77
|
UnityCliSceneMutation.MarkSceneDirty(scene);
|
|
78
78
|
return new System.Threading.Tasks.ValueTask<Result>(new Result
|
|
79
79
|
{
|
|
80
80
|
Deleted = targetRef,
|
|
81
81
|
Destroyed = true,
|
|
82
|
-
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "
|
|
82
|
+
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "game-object.delete", Target = targetRef.Path } }
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
85
|
}
|
|
@@ -7,7 +7,7 @@ using UnityEngine;
|
|
|
7
7
|
namespace UnityCli
|
|
8
8
|
{
|
|
9
9
|
/// <summary>
|
|
10
|
-
///
|
|
10
|
+
/// game-object.duplicate — 复制场景中的 GameObject,可指定新名称或父级。
|
|
11
11
|
/// </summary>
|
|
12
12
|
public class GameObjectDuplicateTool : IUnityCliTool<GameObjectDuplicateTool.Request, GameObjectDuplicateTool.Result>
|
|
13
13
|
{
|
|
@@ -27,10 +27,10 @@ namespace UnityCli
|
|
|
27
27
|
|
|
28
28
|
public ToolDescriptor Describe() => new()
|
|
29
29
|
{
|
|
30
|
-
Name = "
|
|
30
|
+
Name = "game-object.duplicate",
|
|
31
31
|
Summary = "Duplicate a GameObject in the active scene, optionally assigning a new name or parent.",
|
|
32
32
|
Description = "Duplicate a GameObject in the active scene, optionally assigning a new name or parent. Prefer hierarchy paths or instance ids for target and parent; returns the duplicate path/id so follow-up calls can avoid ambiguous names.",
|
|
33
|
-
Group = "
|
|
33
|
+
Group = "game-object",
|
|
34
34
|
DestructiveHint = false,
|
|
35
35
|
SideEffects = new[] { "scene-modify", "undo-stack" },
|
|
36
36
|
Target = "editor",
|
|
@@ -45,7 +45,7 @@ namespace UnityCli
|
|
|
45
45
|
|
|
46
46
|
public System.Threading.Tasks.ValueTask<Result> ExecuteAsync(Request request, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
47
47
|
{
|
|
48
|
-
GameObjectToolSupport.EnsureEditorNotBusy("
|
|
48
|
+
GameObjectToolSupport.EnsureEditorNotBusy("game-object.duplicate");
|
|
49
49
|
if (string.IsNullOrEmpty(request.Target))
|
|
50
50
|
{
|
|
51
51
|
throw new UnityCliBridge.BridgeCommandException("E_TARGET_NOT_FOUND", "GameObject duplicate requires a target.", "Pass a GameObject name, hierarchy path or instance id.");
|
|
@@ -56,7 +56,7 @@ namespace UnityCli
|
|
|
56
56
|
var duplicateName = request.NewName ?? request.Name ?? (source.name + " Copy");
|
|
57
57
|
ctx.CommitEffect();
|
|
58
58
|
var duplicate = UnityEngine.Object.Instantiate(source);
|
|
59
|
-
UnityCliSceneMutation.RegisterCreatedObject(duplicate, "
|
|
59
|
+
UnityCliSceneMutation.RegisterCreatedObject(duplicate, "game-object.duplicate");
|
|
60
60
|
var duplicateId = duplicate.GetInstanceID();
|
|
61
61
|
duplicate.name = duplicateName;
|
|
62
62
|
duplicate.transform.SetParent(parentTransform, true);
|
|
@@ -68,7 +68,7 @@ namespace UnityCli
|
|
|
68
68
|
return new System.Threading.Tasks.ValueTask<Result>(new Result
|
|
69
69
|
{
|
|
70
70
|
GameObject = GameObjectToolSupport.BuildGameObjectDetail(observed),
|
|
71
|
-
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "
|
|
71
|
+
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "game-object.duplicate", Target = GameObjectToolSupport.HierarchyPath(observed) } }
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
}
|
|
@@ -8,7 +8,7 @@ using UnityEngine.SceneManagement;
|
|
|
8
8
|
|
|
9
9
|
namespace UnityCli
|
|
10
10
|
{
|
|
11
|
-
/// <summary>
|
|
11
|
+
/// <summary>game-object.find — exact selector 直达,其他 selector 按 raw hierarchy position 有界续页。</summary>
|
|
12
12
|
public class GameObjectFindTool : IUnityCliTool<GameObjectFindTool.Request, GameObjectFindTool.Result>
|
|
13
13
|
{
|
|
14
14
|
public sealed class Request
|
|
@@ -65,10 +65,10 @@ namespace UnityCli
|
|
|
65
65
|
|
|
66
66
|
public ToolDescriptor Describe() => new()
|
|
67
67
|
{
|
|
68
|
-
Name = "
|
|
68
|
+
Name = "game-object.find",
|
|
69
69
|
Summary = "Resolve exact GameObject ids/paths directly or page filtered hierarchy matches from stable raw positions.",
|
|
70
70
|
Description = "Search loaded GameObjects by exact name, tag, layer or component. by_id uses direct instance resolution and by_path walks only the exact case-sensitive path; neither materializes the scene tree. Other selectors stream Unity hierarchy order with pageSize 1..500 (default 50). All work shares budget defaults of 10000 scans, 4096 nodes, 2048 getters, 4096 reflection calls, 250 main-thread ms and 1 MiB UTF-8; maxima are 100000/20000/10000/20000/2000 ms/8 MiB. No filtered total is fabricated: pageInfo.complete/truncated and nextCursor identify the next raw object. preferPrefabStage scans the open Prefab Stage first. Read-only in Edit and Play Mode.",
|
|
71
|
-
Group = "
|
|
71
|
+
Group = "game-object",
|
|
72
72
|
DestructiveHint = false,
|
|
73
73
|
Target = "editor",
|
|
74
74
|
PlayModeSupport = "supported",
|
|
@@ -130,7 +130,7 @@ namespace UnityCli
|
|
|
130
130
|
if (string.IsNullOrEmpty(request.Cursor)) current = prefabOpen ? prefabRoot : sceneTraversal.First(budget);
|
|
131
131
|
else
|
|
132
132
|
{
|
|
133
|
-
current = UnityCliHierarchyPager.ResolveCursor(request.Cursor, "
|
|
133
|
+
current = UnityCliHierarchyPager.ResolveCursor(request.Cursor, "game-object.find", generation, budget, out phase);
|
|
134
134
|
if (phase != "scene" && phase != "prefab") throw UnityCliHierarchyPager.Stale();
|
|
135
135
|
if (phase == "prefab" && (!prefabOpen || !IsDescendantOrSelf(current.transform, prefabRoot.transform, budget))) throw UnityCliHierarchyPager.Stale();
|
|
136
136
|
if (phase == "scene" && prefabOpen && current.scene.handle == prefabStage.scene.handle) throw UnityCliHierarchyPager.Stale();
|
|
@@ -159,7 +159,7 @@ namespace UnityCli
|
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
if (items.Count == 0 && current != null) throw new UnityCliRequestBudgetExceededException(budget.ExhaustedDimension ?? "scannedRecords");
|
|
162
|
-
var nextCursor = UnityCliHierarchyPager.Cursor("
|
|
162
|
+
var nextCursor = UnityCliHierarchyPager.Cursor("game-object.find", generation, phase, current, budget);
|
|
163
163
|
return new System.Threading.Tasks.ValueTask<Result>(ResultPage(items, pageSize, request.Cursor, nextCursor, generation, prefabOpen, budget));
|
|
164
164
|
}
|
|
165
165
|
|
|
@@ -7,7 +7,7 @@ using UnityEngine;
|
|
|
7
7
|
namespace UnityCli
|
|
8
8
|
{
|
|
9
9
|
/// <summary>
|
|
10
|
-
///
|
|
10
|
+
/// game-object.look-at — 旋转 GameObject 使其 forward 指向另一个 GameObject。
|
|
11
11
|
/// </summary>
|
|
12
12
|
public class GameObjectLookAtTool : IUnityCliTool<GameObjectLookAtTool.Request, GameObjectLookAtTool.Result>
|
|
13
13
|
{
|
|
@@ -26,10 +26,10 @@ namespace UnityCli
|
|
|
26
26
|
|
|
27
27
|
public ToolDescriptor Describe() => new()
|
|
28
28
|
{
|
|
29
|
-
Name = "
|
|
29
|
+
Name = "game-object.look-at",
|
|
30
30
|
Summary = "Rotate a GameObject so its forward vector looks at another GameObject.",
|
|
31
31
|
Description = "Rotate a GameObject so its forward vector looks at another GameObject. Prefer hierarchy paths or instance ids for both target and lookAt after create/duplicate operations.",
|
|
32
|
-
Group = "
|
|
32
|
+
Group = "game-object",
|
|
33
33
|
DestructiveHint = false,
|
|
34
34
|
SideEffects = new[] { "scene-modify", "undo-stack" },
|
|
35
35
|
Target = "editor",
|
|
@@ -44,22 +44,22 @@ namespace UnityCli
|
|
|
44
44
|
|
|
45
45
|
public System.Threading.Tasks.ValueTask<Result> ExecuteAsync(Request request, UnityCliProjectToolContext ctx, System.Threading.CancellationToken ct = default)
|
|
46
46
|
{
|
|
47
|
-
GameObjectToolSupport.EnsureEditorNotBusy("
|
|
47
|
+
GameObjectToolSupport.EnsureEditorNotBusy("game-object.look-at");
|
|
48
48
|
if (string.IsNullOrEmpty(request.Target))
|
|
49
49
|
{
|
|
50
50
|
throw new UnityCliBridge.BridgeCommandException("E_TARGET_NOT_FOUND", "GameObject look-at requires a target.", "Pass a GameObject name, hierarchy path or instance id.");
|
|
51
51
|
}
|
|
52
52
|
var gameObject = GameObjectToolSupport.ResolveUniqueTarget(request.Target, "GameObject look-at requires a target.");
|
|
53
53
|
var lookAtName = request.LookAt ?? request.Destination;
|
|
54
|
-
var lookAt = GameObjectToolSupport.ResolveUniqueTarget(lookAtName, "GameObject look-at requires a lookAt target. Use unitycli tools run
|
|
54
|
+
var lookAt = GameObjectToolSupport.ResolveUniqueTarget(lookAtName, "GameObject look-at requires a lookAt target. Use unitycli tools run game-object.look-at --input '{\"target\":\"CameraRig\",\"lookAt\":\"Player\"}'.");
|
|
55
55
|
var gameObjectId = gameObject.GetInstanceID();
|
|
56
56
|
var direction = lookAt.transform.position - gameObject.transform.position;
|
|
57
57
|
if (direction.sqrMagnitude <= Mathf.Epsilon)
|
|
58
|
-
throw new UnityCliBridge.BridgeCommandException("E_GO_LOOK_AT_DIRECTION_INVALID", "GameObject look-at target must not share the target position.", "Move one object before calling
|
|
58
|
+
throw new UnityCliBridge.BridgeCommandException("E_GO_LOOK_AT_DIRECTION_INVALID", "GameObject look-at target must not share the target position.", "Move one object before calling game-object.look-at.");
|
|
59
59
|
// 在 barrier 前冻结 LookAt 的不可变期望旋转,写入后只接受 fresh readback。
|
|
60
60
|
var expectedRotation = Quaternion.LookRotation(direction);
|
|
61
61
|
ctx.CommitEffect();
|
|
62
|
-
UnityCliSceneMutation.RecordObject(gameObject.transform, "
|
|
62
|
+
UnityCliSceneMutation.RecordObject(gameObject.transform, "game-object.look-at");
|
|
63
63
|
gameObject.transform.rotation = expectedRotation;
|
|
64
64
|
UnityCliSceneMutation.MarkSceneDirty(gameObject.scene);
|
|
65
65
|
var observed = EditorUtility.InstanceIDToObject(gameObjectId) as GameObject;
|
|
@@ -68,7 +68,7 @@ namespace UnityCli
|
|
|
68
68
|
return new System.Threading.Tasks.ValueTask<Result>(new Result
|
|
69
69
|
{
|
|
70
70
|
GameObject = GameObjectToolSupport.BuildGameObjectDetail(observed),
|
|
71
|
-
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "
|
|
71
|
+
PlannedEffects = new List<GameObjectPlannedEffect> { new GameObjectPlannedEffect { Type = "game-object.look-at", Target = GameObjectToolSupport.HierarchyPath(observed) } }
|
|
72
72
|
});
|
|
73
73
|
}
|
|
74
74
|
}
|