Token导航 LogoToken导航TokenDH.com
研究检索需要联网github未标认证来源可访问许可证需确认审计通过

unity-prefabUnity prefab 搜索

Agent Skill

unity-prefab 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

306

周安装

13

GitHub Stars

886

下载量

107
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:unity-prefab(Unity prefab 搜索)
来源仓库:https://github.com/besty0728/unity-skills
仓库路径:skills/unity-prefab
安装命令:
npx skills add https://github.com/besty0728/unity-skills --skill unity-prefab
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/besty0728/unity-skills --skill unity-prefab

简介

unity-prefab 提供批量实例化、属性修改等预制体操作接口。

  • 适用于 UI 元素生成、敌人 spawn 或场景对象管理等场景。
  • 禁止虚构命令如 prefab_create_from_object,仅限已定义方法。
  • 修改预制体前建议备份,防止意外覆盖原始资产。
  • 批量操作需控制频率,避免触发 Unity 编辑器卡顿。

SKILL.md

Unity Prefab Skills

BATCH-FIRST: Use prefab_instantiate_batch when spawning 2+ prefab instances.

Guardrails

Mode: Full-Auto required

DO NOT (common hallucinations):

  • prefab_create_from_object does not exist → use prefab_create (takes scene object name/instanceId and savePath)
  • prefab_spawn does not exist → use prefab_instantiate
  • prefab_edit / prefab_modify do not exist → use prefab_set_property (edit prefab asset directly) or instantiate, modify, then prefab_apply
  • prefab_save does not exist → use prefab_apply (applies instance changes to source prefab)

Routing:

  • To modify components on a prefab instance in scene → use component module skills, then prefab_apply
  • To set a property directly on the prefab asset → prefab_set_property (this module)
  • To find all instances of a prefab → prefab_find_instances (this module)

Skills Overview

Single ObjectBatch VersionUse Batch When
prefab_instantiateprefab_instantiate_batchSpawning 2+ instances

No batch needed:

  • prefab_create - Create prefab from scene object
  • prefab_apply - Apply instance changes to prefab
  • prefab_unpack - Unpack prefab instance
  • prefab_get_overrides - Get instance overrides
  • prefab_revert_overrides - Revert to prefab values
  • prefab_apply_overrides - Apply overrides to prefab
  • prefab_create_variant - Create a prefab variant
  • prefab_find_instances - Find all instances of a prefab in scene
  • prefab_set_property - Set a property on a component inside a Prefab asset (supports basic types, vectors, colors, and asset references)

Skills

prefab_create

Create a prefab from a scene GameObject.

ParameterTypeRequiredDescription
namestringNo*Source object name
instanceIdintNo*Instance ID
pathstringNo*Object path
instanceIdintNo*Instance ID
savePathstringYesPrefab save path

Returns: {success, prefabPath, sourceObject}

prefab_instantiate

Instantiate a prefab into the scene.

ParameterTypeRequiredDefaultDescription
prefabPathstringYes-Prefab asset path
namestringNoprefab nameInstance name
x, y, zfloatNo0Local position (relative to parent if set)
parentNamestringNonullParent object name
parentInstanceIdintNo0Parent instance ID
parentPathstringNonullParent hierarchy path

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

prefab_instantiate_batch

Instantiate multiple prefabs in one call.

ParameterTypeRequiredDescription
itemsarrayYesArray of instantiation configs

Item properties: prefabPath, name, x, y, z, rotX, rotY, rotZ, scaleX, scaleY, scaleZ, parentName, parentInstanceId, parentPath

Returns: {success, totalItems, successCount, failCount, results: [{success, name, instanceId, prefabPath, position}]}

unity_skills.call_skill("prefab_instantiate_batch", items=[
    {"prefabPath": "Assets/Prefabs/Enemy.prefab", "x": 0, "z": 0, "name": "Enemy_01"},
    {"prefabPath": "Assets/Prefabs/Enemy.prefab", "x": 2, "z": 0, "name": "Enemy_02"},
    {"prefabPath": "Assets/Prefabs/Enemy.prefab", "x": 4, "z": 0, "name": "Enemy_03"}
])

prefab_apply

Apply instance changes back to the prefab asset.

ParameterTypeRequiredDescription
namestringNo*Prefab instance name
instanceIdintNo*Instance ID
pathstringNo*Object path
instanceIdintNo*Instance ID

Returns: {success, gameObject, prefabPath}

prefab_unpack

Unpack a prefab instance (break prefab connection).

ParameterTypeRequiredDefaultDescription
namestringNo*-Prefab instance name
instanceIdintNo*-Instance ID
pathstringNo*-Object path
instanceIdintNo*-Instance ID
completelyboolNofalseUnpack all nested prefabs

Returns: {success, gameObject, mode}

prefab_get_overrides

Get list of property overrides on a prefab instance.

ParameterTypeRequiredDescription
namestringNo*Prefab instance name
instanceIdintNo*Instance ID

Returns: {success, overrides: [{type, path, property}]}

prefab_revert_overrides

Revert all overrides on a prefab instance back to prefab values.

ParameterTypeRequiredDescription
namestringNo*Prefab instance name
instanceIdintNo*Instance ID

prefab_apply_overrides

Apply all overrides from instance to source prefab asset.

ParameterTypeRequiredDescription
namestringNo*Prefab instance name
instanceIdintNo*Instance ID

prefab_create_variant

Create a prefab variant from an existing prefab.

ParameterTypeRequiredDefaultDescription
sourcePrefabPathstringYes-Path to the source prefab asset
variantPathstringYes-Save path for the new variant

Returns: {success, sourcePath, variantPath, name}

prefab_find_instances

Find all instances of a prefab in the current scene.

ParameterTypeRequiredDefaultDescription
prefabPathstringYes-Prefab asset path to search for
limitintNo50Maximum number of instances to return

Returns: {success, prefabPath, count, instances: [{name, path, instanceId}]}

prefab_set_property

Set a property on a component inside a Prefab asset file (without instantiating it). Supports basic types, vectors, colors, enums, and asset references.

ParameterTypeRequiredDefaultDescription
prefabPathstringYes-Path to the prefab asset
componentTypestringYes-Component type name
propertyNamestringYes-Serialized property name
valuestringCond.nullValue for basic types (int/float/bool/string/enum/vector/color)
assetReferencePathstringCond.nullAsset path for Object reference fields (Material, Texture, AudioClip, ScriptableObject, etc.)
gameObjectNamestringNonullChild object name inside prefab (defaults to root)
Provide either value (basic types) or assetReferencePath (asset references).

Returns: {success, prefabPath, gameObject, component, property, valueSet}

# Set a float property on prefab root
unity_skills.call_skill("prefab_set_property",
    prefabPath="Assets/Prefabs/Enemy.prefab",
    componentType="EnemyStats",
    propertyName="maxHealth",
    value="100"
)

# Assign an asset reference to a prefab component
unity_skills.call_skill("prefab_set_property",
    prefabPath="Assets/Prefabs/Enemy.prefab",
    componentType="AudioSource",
    propertyName="m_audioClip",
    assetReferencePath="Assets/Audio/hit.wav"
)

# Edit a child object inside a prefab
unity_skills.call_skill("prefab_set_property",
    prefabPath="Assets/Prefabs/Player.prefab",
    componentType="MeshRenderer",
    propertyName="m_Materials.Array.data[0]",
    assetReferencePath="Assets/Materials/PlayerSkin.mat",
    gameObjectName="Body"
)

Example: Efficient Enemy Spawning

import unity_skills

# BAD: 10 API calls for 10 enemies
for i in range(10):
    unity_skills.call_skill("prefab_instantiate",
        prefabPath="Assets/Prefabs/Enemy.prefab",
        name=f"Enemy_{i}",
        x=i * 2
    )

# GOOD: 1 API call for 10 enemies
unity_skills.call_skill("prefab_instantiate_batch", items=[
    {"prefabPath": "Assets/Prefabs/Enemy.prefab", "name": f"Enemy_{i}", "x": i * 2}
    for i in range(10)
])

Best Practices

  1. Organize prefabs in dedicated folders
  2. Use prefabs for repeated objects
  3. Apply changes to update all instances
  4. Unpack only when unique modifications needed
  5. Use batch instantiation for level generation

Exact Signatures

Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

35.3%
按下载量换算38

Claude

31.66%
按下载量换算34

Cursor

20.94%
按下载量换算22

Gemini CLI

9.11%
按下载量换算10

安全审计

Gen Agent Trust Hub

通过

Socket

通过

Snyk

通过

权限和风险

需要联网

该 Skill 可能需要联网访问来源站点、仓库或外部 API;具体网络访问范围需要结合源码和 README 复核。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills