一键导入
unity-gameobject
Use when users want to create, delete, move, rotate, scale, or parent GameObjects.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Use when users want to create, delete, move, rotate, scale, or parent GameObjects.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Use when working with a Unity project via MCP — creating or editing scenes, GameObjects, components, prefabs, materials, UI, lighting, navmesh, animations, terrain, C# scripts, or any other Unity Editor task.
Use when users want to run Unity tests or read test results.
Use when users want to enter play mode, select objects, undo/redo, or execute menu commands.
Use when creating, reading, editing, searching, validating, or deleting C# scripts in a Unity project.
Use when about to write or install a custom Editor script, add a [MenuItem], build a custom Editor window, or create a one-off Editor helper — to check whether a ready-to-paste template already exists in tooling/<domain>/ before reaching for Unity_CreateScript.
Use when users want to create Canvas, Button, Text, Image, or other UI elements.
| name | unity-gameobject |
| description | Use when users want to create, delete, move, rotate, scale, or parent GameObjects. |
BATCH-FIRST: Use
*_batchskills when operating on 2+ objects to reduce API calls from N to 1.
DO NOT (common hallucinations):
gameobject_move / gameobject_rotate / gameobject_set_scale do not exist → use gameobject_set_transform (handles position, rotation, and scale together)gameobject_set_position does not exist → use gameobject_set_transform with posX/posY/posZgameobject_add_component does not exist → use component_add (component module)gameobject_get_transform does not exist → use gameobject_get_info (returns position/rotation/scale)Routing:
component modulematerial modulegameobject_find (this module) or scene_find_objects (scene module, Semi-Auto)Object Targeting: All single-object skills accept three identifiers:
name(string),instanceId(int, preferred for precision),path(string, hierarchy path like "Parent/Child"). Provide at least one. When onlynameis shown in a parameter table,instanceIdandpathare also accepted.
| Single Object | Batch Version | Use Batch When |
|---|---|---|
gameobject_create | gameobject_create_batch | Creating 2+ objects |
gameobject_delete | gameobject_delete_batch | Deleting 2+ objects |
gameobject_duplicate | gameobject_duplicate_batch | Duplicating 2+ objects |
gameobject_rename | gameobject_rename_batch | Renaming 2+ objects |
gameobject_set_transform | gameobject_set_transform_batch | Moving 2+ objects |
gameobject_set_active | gameobject_set_active_batch | Toggling 2+ objects |
gameobject_set_parent | gameobject_set_parent_batch | Parenting 2+ objects |
| - | gameobject_set_layer_batch | Setting layer on 2+ objects |
| - | gameobject_set_tag_batch | Setting tag on 2+ objects |
Query Skills (no batch needed):
gameobject_find - Find objects by name/tag/layer/componentgameobject_get_info - Get detailed object informationCreate a new GameObject (primitive or empty).
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | Yes | - | Object name |
primitiveType | string | No | null | Cube/Sphere/Capsule/Cylinder/Plane/Quad (null=Empty) |
x, y, z | float | No | 0 | Local position (relative to parent if set) |
parentName | string | No | null | Parent object name |
parentInstanceId | int | No | 0 | Parent instance ID |
parentPath | string | No | null | Parent hierarchy path |
Returns: {success, name, instanceId, path, parent, position}
Delete a GameObject.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID (preferred) |
path | string | No* | Hierarchy path |
*At least one identifier required
Duplicate a GameObject.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID |
path | string | No* | Hierarchy path |
Returns: {originalName, copyName, copyInstanceId, copyPath}
Rename a GameObject.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Current object name |
instanceId | int | No* | Instance ID (preferred) |
newName | string | Yes | New name |
Returns: {success, oldName, newName, instanceId}
Find GameObjects matching criteria.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | null | Name filter |
tag | string | No | null | Tag filter |
layer | string | No | null | Layer filter |
component | string | No | null | Component type filter |
useRegex | bool | No | false | Use regex for name |
limit | int | No | 50 | Max results |
Returns: {count, objects: [{name, instanceId, path, tag, layer}]}
Get detailed GameObject information.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID |
path | string | No* | Hierarchy path |
Returns: {name, instanceId, path, tag, layer, isActive, position, rotation, scale, parent, parentPath, childCount, components, children}
Set position, rotation, scale, and/or RectTransform properties. All transform params are optional — only supplied fields are applied.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID (preferred) |
path | string | No* | Hierarchy path |
posX/posY/posZ | float? | No | World position |
rotX/rotY/rotZ | float? | No | Rotation (euler) |
scaleX/scaleY/scaleZ | float? | No | Local scale |
localPosX/localPosY/localPosZ | float? | No | Local position (3D and UI) |
anchoredPosX/anchoredPosY | float? | No | Anchored position (UI only) |
anchorMinX/anchorMinY | float? | No | Anchor min (UI only) |
anchorMaxX/anchorMaxY | float? | No | Anchor max (UI only) |
pivotX/pivotY | float? | No | Pivot (UI only) |
sizeDeltaX/sizeDeltaY | float? | No | Size delta (UI only) |
width/height | float? | No | Size shortcut via SetSizeWithCurrentAnchors (UI only) |
*At least one identifier required
Returns (3D): {success, name, instanceId, isUI: false, position, localPosition, rotation, scale}
Returns (UI): {success, name, instanceId, isUI: true, anchoredPosition, anchorMin, anchorMax, pivot, sizeDelta, rect, localPosition}
Set parent-child relationship.
| Parameter | Type | Required | Description |
|---|---|---|---|
childName | string | No* | Child object name |
childInstanceId | int | No* | Child Instance ID (preferred) |
childPath | string | No* | Child hierarchy path |
parentName | string | No* | Parent object name (empty string = unparent) |
parentInstanceId | int | No* | Parent Instance ID |
parentPath | string | No* | Parent hierarchy path |
*At least one child identifier and one parent identifier required
Enable or disable a GameObject.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | No* | Object name |
instanceId | int | No* | Instance ID (preferred) |
path | string | No* | Hierarchy path |
active | bool | Yes | Enable state |
*At least one identifier required
Recipe path rule: ../../recipes/gameobject/<command>.md
Create multiple GameObjects in one call.
Item properties: name, primitiveType, x, y, z, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, parentName, parentInstanceId, parentPath
Returns: {success, totalItems, successCount, failCount, results: [{success, name, instanceId, path, position}]}
Delete multiple GameObjects. items accepts an array of strings (names) or objects {name, instanceId, path}.
Returns: {success, totalItems, successCount, failCount, results: [{success, target}]}
Duplicate multiple GameObjects.
Returns: {success, totalItems, successCount, failCount, results: [{success, originalName, copyName, copyInstanceId, copyPath}]}
Rename multiple GameObjects.
Returns: {success, totalItems, successCount, failCount, results: [{success, oldName, newName, instanceId}]}
Set transforms for multiple objects. Each item accepts the same fields as gameobject_set_transform plus name/instanceId/path.
Returns: {success, totalItems, successCount, failCount, results: [{success, name, pos: {x,y,z}}]}
Toggle multiple objects. Each item: {name, instanceId, path, active}.
Returns: {success, totalItems, successCount, failCount, results: [{success, target, active}]}
Parent multiple objects. Each item supports childName/childInstanceId/childPath and parentName/parentInstanceId/parentPath.
Returns: {success, totalItems, successCount, failCount, results: [{success, target, parent}]}
Set layer for multiple objects. Each item: {name, instanceId, path, layer, recursive}. Set recursive: true to apply to all children.
Returns: {success, totalItems, successCount, failCount, results: [{success, target, layer}]}
Set tag for multiple objects. Each item: {name, instanceId, path, tag}.
Returns: {success, totalItems, successCount, failCount, results: [{success, target, tag}]}