Create GameObject
unity_create_gameobjectCreate empty GameObjects or Unity primitives (cube, sphere, etc.) with optional parenting, position, rotation, and scale. Uses Undo for revert and returns path and name.
Instructions
Create an empty GameObject or a Unity primitive (cube/sphere/capsule/cylinder/plane/quad), optionally parented. Uses Undo so it can be reverted in Editor.
Args: name (required), primitive_type (default none), position/rotation/scale arrays, parent_path (optional). Returns { path, name }. Save with unity_save_scene when done.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | Name for the new GameObject, e.g. 'PlayerSpawn' | |
| scale | No | Local scale as [x, y, z] (default 1,1,1) | |
| position | No | World position as [x, y, z] (default 0,0,0) | |
| rotation | No | World rotation euler degrees as [x, y, z] (default 0,0,0) | |
| parent_path | No | Optional hierarchy path of the parent, e.g. 'Level/Spawns' | |
| primitive_type | No | Empty object ('none') or a Unity primitive to create | none |