unity-edit-component
编辑 GameObject 上的组件属性。
安装与使用
请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。
查看来源 ↗使用指南技能说明
Unity MCP: edit_component
通过 args 传递参数。
参数 (args)
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
action |
string | 是 | 操作: set_property, get_property, list_components |
target |
string | 是 | 目标 GameObject 路径 |
component |
string | 是 | 组件类型名称 |
property |
string | 否 | 属性名称 |
value |
any | 否 | 要设置的属性值 |
- set_property — 设置组件属性
- get_property — 获取组件属性
- list_components — 列出 GameObject 上的所有组件
示例参数
{ "action": "set_property", "target": "Player", "component": "Rigidbody", "property": "mass", "value": 1.5 }
响应
成功: { "success": true, "data": ... }. 失败: { "success": false, "message": "...", "error": "..." }.
使用示例
查看来源仓库中的使用示例与配置说明。
查看来源 ↗来源历史
- 收录时间
- 2026-03-11
- 索引更新时间
- 2026-03-11
- Branch
- main
收录与同步日期属于本站记录。源码修改历史请查看来源仓库。
GitHub ↗chat Comments (0)
Sign in to join the discussion and leave a comment.
No comments yet. Be the first to share your thoughts!