feat(scene): expose LODGroup bounds recalculation - #886
Merged
star-e merged 6 commits intoAug 27, 2026
Conversation
Contributor
Author
本次提交在已有 新增公开接口
同时新增 MCP Tools:
写操作支持 undo/redo、dirty 状态和 参数约定
LODGroup Gizmo
PinK 对接PinK 应直接调用 cocos-cli SDK,不需要调用 MCP Tool 或内部 RPC: await cli.Scene.Component.insertLOD({
path: 'Root/LOD/cc.LODGroup',
index: 0,
});
const relativeHeight =
await cli.Scene.Component.queryLODGroupRelativeHeight({
path: 'Root/LOD/cc.LODGroup',
});
await cli.Scene.Component.eraseLOD({
path: 'Root/LOD/cc.LODGroup',
index: 0,
}); |
dogodo-cc
approved these changes
Aug 27, 2026
star-e
approved these changes
Aug 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
变更说明
本 PR 为 cocos-cli 增加
cc.LODGroup包围盒重算能力,同时向 SDK 和 MCP/AI 开放。CLI SDK
新增:
返回:
实现包含:
cc.LODGroup。LODGroup.recalculateBounds()。record: false时不写入 undo 历史。MCP/AI Tool
新增工具:
调用参数:
{ "options": { "path": "Canvas/LODNode/cc.LODGroup", "record": true } }PinK 对接边界
cocos-cli 已完成底层 SDK 接口。
PinK 侧负责:
InvokeAPIMap.component注册recalculate-lod-group-bounds。ComponentAPI中转发到:PinK 不需要调用 MCP Tool。PinK 和 MCP/AI 只是不同入口,最终复用同一个
ComponentService方法。测试方法
调用
scene-recalculate-lod-group-bounds:{ "options": { "path": "LODGroupMcpTest/cc.LODGroup", "record": false } }空 LODGroup 的预期结果:
{ "code": 200, "data": { "localBoundaryCenter": { "x": 0, "y": 0, "z": 0 }, "objectSize": 0 } }path必须是组件路径,不能只传节点路径。