create_game_object
Creates a new GameObject in the active scene, either empty or as a primitive (Cube, Sphere, etc.), with local position/rotation/scale and an optional parent. The creation is undoable and the new object becomes the selection.
分類: シーン
| 名前 | 型 | 必須 | 既定値 | 説明 |
|---|---|---|---|---|
name |
string | 必須 | "New GameObject" |
Name for the new GameObject |
primitive_type |
string | "Empty" |
Type of primitive to create (Cube, Sphere, Capsule, Cylinder, Plane, Quad, Empty) 値: Cube, Sphere, Capsule, Cylinder, Plane, Quad, Empty |
|
parent_path |
string | Path to parent GameObject (optional) | ||
position |
object | Initial position | ||
rotation |
object | Initial rotation in euler angles | ||
scale |
object | Initial scale |
呼び出しの例
Section titled “呼び出しの例”必須の引数だけを入れています。ほかは必要に応じて足してください。
{ "name": "create_game_object", "arguments": { "name": "New GameObject" }}SuperSave モードでは
Section titled “SuperSave モードでは”Unity を NANORA_MCP_SUPERSAVE=1 で起動したときは、メタツール execute から {"tool": "create_game_object", "args": { … }} の形で呼びます。SuperSave モードを参照。
Assets/NanoraUnityMCP/Editor/Tools/CreateGameObjectTool.cs(版 1.2.1)から生成しています。説明文はツール定義のまま(英語)です。AI クライアントは tools/list で同じスキーマを受け取ります。