Agent Skills › Besty0728/Unity-Skills › unity-gameobject

unity-gameobject

GitHub

用于Unity场景中游戏对象的创建、查找、删除、重命名及变换操作,支持批量处理与层级管理。

SkillsForUnity/unity-skills~/skills/gameobject/SKILL.md Besty0728/Unity-Skills

Trigger Scenarios

搭建或调整场景层级 新建或删除物体 修改Transform

Install

npx skills add Besty0728/Unity-Skills --skill unity-gameobject -g -y
More Options

Non-standard path

npx skills add https://github.com/Besty0728/Unity-Skills/tree/main/SkillsForUnity/unity-skills~/skills/gameobject -g -y

Use without installing

npx skills use Besty0728/Unity-Skills@unity-gameobject

指定 Agent (Claude Code)

npx skills add Besty0728/Unity-Skills --skill unity-gameobject -a claude-code -g -y

安装 repo 全部 skill

npx skills add Besty0728/Unity-Skills --all -g -y

预览 repo 内 skill

npx skills add Besty0728/Unity-Skills --list

SKILL.md

Frontmatter
{
    "name": "unity-gameobject",
    "description": "Create and manipulate GameObjects"
}

Triggers

  • Building or restructuring scene hierarchy
  • Spawning or removing objects
  • Adjusting transforms
  • 搭建或调整场景层级、新建或删除物体、修改 Transform

Unity GameObject Skills

Create, find, parent and transform scene objects. Parameters come from the schema (recommend includeSchema=true or /skills/schema?names=), which notes the non-obvious ones — never from a skill's name. Execution, dryRun and verification rules: root SKILL.md.

Operating Mode

gameobject_find / gameobject_get_info are SemiAuto (read-only); every other skill is FullAuto. gameobject_delete / gameobject_delete_batch (Operation.Delete) are NeverInSemi: MODE_FORBIDDEN under Approval/Auto, run only under Bypass or an Allowlist hit → operating mode.

Shared rules

  • Identifiers: entityId (string; Unity 6000.4+, where instanceId reads 0), instanceId (int, older Unity), path ("Parent/Child", case-insensitive, optional scene-name prefix), name. Give at least one; precedence entityId > instanceId > path > name, and a stale id or missed path falls through to the next one given.
  • Name matching: an exact name wins (the first in hierarchy order when several share it); otherwise a single whole-word or substring match is used. Several fuzzy matches return TARGET_NOT_FOUND with candidates (path + entityId each) instead of guessing. Non-exact resolutions are listed in top-level resolutionNotes.
  • Spaces: gameobject_create x/y/z and rotX/Y/Z are local to the parent unless space:"world" (applied after parenting). gameobject_set_transform posX/Y/Z and rotX/Y/Z are world, localPosX/Y/Z local; it applies world position, then local position, then rotation, then scale, so local wins on a shared axis and omitted axes keep their value. scaleX/Y/Z is always localScale. RectTransform fields (anchor*, pivot*, sizeDelta*, width/height) are UI-only.
  • Read-back: create, set_transform and their batches return the Transform read back — position (world), localPosition, rotation (world euler, 0–360), scale (local), as gameobject_get_info reports them; no follow-up read needed.
  • Batches (items = JSON array): all-or-nothing. One failed item reverts the whole call (rolledBack:true, the other items reverted:true, error SEMANTIC_INVALID); fix the failed items and resend all. Unknown item keys are ignored and named in warnings. Items take the single skill's identifiers and fields; gameobject_create_batch items may parent to an item created earlier in the same call.

Skills Overview

Use *_batch for 2+ objects (one call instead of N).

Single Batch
gameobject_create gameobject_create_batch
gameobject_delete gameobject_delete_batch
gameobject_duplicate (sibling <name>_Copy) gameobject_duplicate_batch
gameobject_rename gameobject_rename_batch
gameobject_set_transform gameobject_set_transform_batch
gameobject_set_active gameobject_set_active_batch
gameobject_set_parent (no parent id = unparent) gameobject_set_parent_batch
- gameobject_set_layer_batch
- gameobject_set_tag_batch
gameobject_set_sibling_index (index clamped) -

Query (no batch): gameobject_find (name substring or regex, tag, layer, component), gameobject_get_info (transform, parent, children, components).

Per-skill tables, item fields and return shapes: reference/<skill_name>.md — rarely needed, the schema notes the parameters.

DO NOT (common hallucinations):

  • gameobject_move / gameobject_rotate / gameobject_set_scale / gameobject_set_position do not exist → use gameobject_set_transform
  • gameobject_add_component does not exist → use component_add
  • gameobject_get_transform does not exist → use gameobject_get_info

Elsewhere: components → component_* skills; material or colour → material_* skills; scene_find_objects (SemiAuto) also searches objects.

Exact Signatures

Names, parameters, defaults and required flags come from GET /skills/schema?category=GameObject (or ?names=a,b), not this file.

Common Errors

Error Fix
TARGET_NOT_FOUND (object, parent, child, layer) Retry with a candidates entry's path / entityId, or locate it via gameobject_find / scene_get_hierarchy.
MISSING_PARAM Supply it (e.g. newName, items); the error (or a dryRun) lists all parameters.
SEMANTIC_INVALID Use an allowed value from the message (primitiveType, space local/world, a registered tag) or fix the failed results items.

Transport codes (COMPILING, RATE_LIMIT, ...) → error codes.

Version History

  • 67cd2ca Current 2026-10-18 21:38
  • 8c31c5a 2026-08-27 12:43

    修复模块文档审计问题,更新Addressables相关技能文档,同步协议引用并清理注释。

  • 5ee8388 2026-08-17 04:10

    精简根SKILL.md体积至6.2KB,将协议细节移至参考文档;新增SKILL_GUIDE.md说明引导模式协议;增加manual-*建议模块;更新版本锚点至2.6.0并添加变更日志。

  • 25d511e 2026-08-13 09:14

    压缩75个SKILL.md的description至约5,191字符,并将路由说明移至Triggers部分。

  • 14e175d 2026-07-19 18:06

    同步更新README/SETUP/agent及skill文档,微调顶层/skills/gameobject/history的SKILL.md及unity_skills.py,适配新端点与功能。

  • ec9f870 2026-07-05 14:39

Same Skill Collection

SkillsForUnity/unity-skills~/skills/addressables-design/SKILL.md
SkillsForUnity/unity-skills~/skills/addressables/SKILL.md
SkillsForUnity/unity-skills~/skills/adr/SKILL.md
SkillsForUnity/unity-skills~/skills/animator/SKILL.md
SkillsForUnity/unity-skills~/skills/behavior/SKILL.md
SkillsForUnity/unity-skills~/skills/blueprints/SKILL.md
SkillsForUnity/unity-skills~/skills/event/SKILL.md
SkillsForUnity/unity-skills~/skills/graphics/SKILL.md
SkillsForUnity/unity-skills~/skills/history/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-component/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-gameobject/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-material/SKILL.md
SkillsForUnity/unity-skills~/skills/manual-scene/SKILL.md
SkillsForUnity/unity-skills~/skills/material/SKILL.md
SkillsForUnity/unity-skills~/skills/netcode-design/SKILL.md
SkillsForUnity/unity-skills~/skills/netcode/SKILL.md
SkillsForUnity/unity-skills~/skills/perception/SKILL.md
SkillsForUnity/unity-skills~/skills/pico-design/SKILL.md
SkillsForUnity/unity-skills~/skills/primetween/SKILL.md
SkillsForUnity/unity-skills~/skills/probuilder/SKILL.md
SkillsForUnity/unity-skills~/skills/profiler/SKILL.md
SkillsForUnity/unity-skills~/skills/project-scout/SKILL.md
SkillsForUnity/unity-skills~/skills/qframework-design/SKILL.md
SkillsForUnity/unity-skills~/skills/sample/SKILL.md
SkillsForUnity/unity-skills~/skills/shadergraph-design/SKILL.md
SkillsForUnity/unity-skills~/skills/skill-creator/SKILL.md
SkillsForUnity/unity-skills~/skills/SKILL.md
SkillsForUnity/unity-skills~/skills/smart/SKILL.md
SkillsForUnity/unity-skills~/skills/unity-cli/SKILL.md
SkillsForUnity/unity-skills~/skills/yaml-editing/SKILL.md
SkillsForUnity/unity-skills~/SKILL.md
SkillsForUnity/unity-skills~/skills/architecture/SKILL.md
SkillsForUnity/unity-skills~/skills/asmdef/SKILL.md
SkillsForUnity/unity-skills~/skills/asset/SKILL.md
SkillsForUnity/unity-skills~/skills/async/SKILL.md
SkillsForUnity/unity-skills~/skills/batch/SKILL.md
SkillsForUnity/unity-skills~/skills/bookmark/SKILL.md
SkillsForUnity/unity-skills~/skills/camera/SKILL.md
SkillsForUnity/unity-skills~/skills/cinemachine/SKILL.md
SkillsForUnity/unity-skills~/skills/cleaner/SKILL.md
SkillsForUnity/unity-skills~/skills/component/SKILL.md
SkillsForUnity/unity-skills~/skills/console/SKILL.md
SkillsForUnity/unity-skills~/skills/debug/SKILL.md
SkillsForUnity/unity-skills~/skills/decal/SKILL.md
SkillsForUnity/unity-skills~/skills/dotween-design/SKILL.md
SkillsForUnity/unity-skills~/skills/dotween/SKILL.md
SkillsForUnity/unity-skills~/skills/editor/SKILL.md
SkillsForUnity/unity-skills~/skills/hybridclr/SKILL.md
SkillsForUnity/unity-skills~/skills/importer/SKILL.md

Metadata

Files
0
Version
67cd2ca
Hash
45834278
Indexed
2026-07-05 14:39

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 06:42
浙ICP备14020137号-1