Agent Skill
2/7/2026

unity-gameobject

Create, delete, find, and transform GameObjects. Use *_batch skills for 2+ objects.

B
besty0728
97GitHub Stars
1Views
npx skills add Besty0728/Unity-Skills

SKILL.md

Nameunity-gameobject
DescriptionCreate, delete, find, and transform GameObjects. Use *_batch skills for 2+ objects.

name: unity-gameobject description: "GameObject creation and manipulation. Use when users want to create, delete, move, rotate, scale, or parent GameObjects. Triggers: gameobject, create, delete, transform, position, rotation, scale, parent, hierarchy, 游戏对象, Unity创建, Unity删除, Unity移动, Unity旋转, Unity缩放."

Unity GameObject Skills

BATCH-FIRST: Use *_batch skills when operating on 2+ objects to reduce API calls from N to 1.

Skills Overview

Single ObjectBatch VersionUse Batch When
gameobject_creategameobject_create_batchCreating 2+ objects
gameobject_deletegameobject_delete_batchDeleting 2+ objects
gameobject_duplicategameobject_duplicate_batchDuplicating 2+ objects
gameobject_renamegameobject_rename_batchRenaming 2+ objects
gameobject_set_transformgameobject_set_transform_batchMoving 2+ objects
gameobject_set_activegameobject_set_active_batchToggling 2+ objects
gameobject_set_parentgameobject_set_parent_batchParenting 2+ objects
-gameobject_set_layer_batchSetting layer on 2+ objects
-gameobject_set_tag_batchSetting tag on 2+ objects

Query Skills (no batch needed):

  • gameobject_find - Find objects by name/tag/layer/component
  • gameobject_get_info - Get detailed object information

Single-Object Skills

gameobject_create

Create a new GameObject (primitive or empty).

ParameterTypeRequiredDefaultDescription
namestringNo"GameObject"Object name
primitiveTypestringNonullCube/Sphere/Capsule/Cylinder/Plane/Quad (null=Empty)
x, y, zfloatNo0Position
parentNamestringNonullParent object name

Returns: {success, name, instanceId, path, position}

gameobject_delete

Delete a GameObject.

ParameterTypeRequiredDescription
namestringNo*Object name
instanceIdintNo*Instance ID (preferred)
pathstringNo*Hierarchy path

*At least one identifier required

gameobject_duplicate

Duplicate a GameObject.

ParameterTypeRequiredDescription
namestringNo*Object name
instanceIdintNo*Instance ID
pathstringNo*Hierarchy path

Returns: {originalName, copyName, copyInstanceId, copyPath}

gameobject_rename

Rename a GameObject.

ParameterTypeRequiredDescription
namestringNo*Current object name
instanceIdintNo*Instance ID (preferred)
newNamestringYesNew name

Returns: {success, oldName, newName, instanceId}

gameobject_find

Find GameObjects matching criteria.

ParameterTypeRequiredDefaultDescription
namestringNonullName filter
tagstringNonullTag filter
layerintNo-1Layer filter
componentstringNonullComponent type filter
useRegexboolNofalseUse regex for name
limitintNo100Max results

Returns: {count, objects: [{name, instanceId, path, tag, layer}]}

gameobject_get_info

Get detailed GameObject information.

ParameterTypeRequiredDescription
namestringNo*Object name
instanceIdintNo*Instance ID
pathstringNo*Hierarchy path

Returns: {name, instanceId, path, tag, layer, active, position, rotation, scale, components, children}

gameobject_set_transform

Set position, rotation, and/or scale.

ParameterTypeRequiredDescription
namestringYesObject name
posX/posY/posZfloatNoPosition
rotX/rotY/rotZfloatNoRotation (euler)
scaleX/scaleY/scaleZfloatNoScale

gameobject_set_parent

Set parent-child relationship.

ParameterTypeRequiredDescription
namestringYesChild object name
parentNamestringYesParent object name (empty string = unparent)

gameobject_set_active

Enable or disable a GameObject.

ParameterTypeRequiredDescription
namestringYesObject name
activeboolYesEnable state

Batch Skills

gameobject_create_batch

Create multiple GameObjects in one call.

unity_skills.call_skill("gameobject_create_batch", items=[
    {"name": "Cube1", "primitiveType": "Cube", "x": 0},
    {"name": "Cube2", "primitiveType": "Cube", "x": 2},
    {"name": "Cube3", "primitiveType": "Cube", "x": 4}
])

gameobject_delete_batch

Delete multiple GameObjects.

# By names
unity_skills.call_skill("gameobject_delete_batch", items=["Cube1", "Cube2", "Cube3"])

# By instanceId (preferred)
unity_skills.call_skill("gameobject_delete_batch", items=[
    {"instanceId": 12345},
    {"instanceId": 12346}
])

gameobject_duplicate_batch

Duplicate multiple GameObjects.

unity_skills.call_skill("gameobject_duplicate_batch", items=[
    {"instanceId": 12345},
    {"instanceId": 12346}
])

gameobject_rename_batch

Rename multiple GameObjects.

unity_skills.call_skill("gameobject_rename_batch", items=[
    {"instanceId": 12345, "newName": "Enemy_01"},
    {"instanceId": 12346, "newName": "Enemy_02"}
])

gameobject_set_transform_batch

Set transforms for multiple objects.

unity_skills.call_skill("gameobject_set_transform_batch", items=[
    {"name": "Cube1", "posX": 0, "posY": 1},
    {"name": "Cube2", "posX": 2, "posY": 1},
    {"name": "Cube3", "posX": 4, "posY": 1}
])

gameobject_set_active_batch

Toggle multiple objects.

unity_skills.call_skill("gameobject_set_active_batch", items=[
    {"name": "Enemy1", "active": False},
    {"name": "Enemy2", "active": False}
])

gameobject_set_parent_batch

Parent multiple objects.

unity_skills.call_skill("gameobject_set_parent_batch", items=[
    {"childName": "Wheel1", "parentName": "Car"},
    {"childName": "Wheel2", "parentName": "Car"}
])

gameobject_set_layer_batch

Set layer for multiple objects.

unity_skills.call_skill("gameobject_set_layer_batch", items=[
    {"name": "Enemy1", "layer": 8},
    {"name": "Enemy2", "layer": 8}
])

gameobject_set_tag_batch

Set tag for multiple objects.

unity_skills.call_skill("gameobject_set_tag_batch", items=[
    {"name": "Enemy1", "tag": "Enemy"},
    {"name": "Enemy2", "tag": "Enemy"}
])

Example: Efficient Scene Setup

import unity_skills

# BAD: 6 API calls
unity_skills.call_skill("gameobject_create", name="Floor", primitiveType="Plane")
unity_skills.call_skill("gameobject_create", name="Wall1", primitiveType="Cube")
unity_skills.call_skill("gameobject_create", name="Wall2", primitiveType="Cube")
unity_skills.call_skill("gameobject_set_transform", name="Wall1", posX=-5, scaleY=3)
unity_skills.call_skill("gameobject_set_transform", name="Wall2", posX=5, scaleY=3)
unity_skills.call_skill("gameobject_set_tag_batch", items=[{"name": "Wall1", "tag": "Wall"}, {"name": "Wall2", "tag": "Wall"}])

# GOOD: 3 API calls
unity_skills.call_skill("gameobject_create_batch", items=[
    {"name": "Floor", "primitiveType": "Plane"},
    {"name": "Wall1", "primitiveType": "Cube"},
    {"name": "Wall2", "primitiveType": "Cube"}
])
unity_skills.call_skill("gameobject_set_transform_batch", items=[
    {"name": "Wall1", "posX": -5, "scaleY": 3},
    {"name": "Wall2", "posX": 5, "scaleY": 3}
])
unity_skills.call_skill("gameobject_set_tag_batch", items=[
    {"name": "Wall1", "tag": "Wall"},
    {"name": "Wall2", "tag": "Wall"}
])
Skills Info
Original Name:unity-gameobjectAuthor:besty0728