unity-asset
Unity Asset Skills
BATCH-FIRST: Use
*_batchskills when operating on 2+ assets.
Guardrails
Mode: Semi-Auto (available by default)
DO NOT (common hallucinations):
asset_createdoes not exist → useasset_create_folder(folders),material_create(materials),script_create(scripts)asset_renamedoes not exist → useasset_movewith new pathasset_searchdoes not exist → useasset_findwith searchFilter syntax (e.g.t:Texture2D player)asset_copydoes not exist → useasset_duplicate
Routing:
- For texture/model/audio import settings → use
importermodule (Full-Auto) - For material creation → use
materialmodule (Full-Auto) - For script creation → use
scriptmodule
Skills Overview
| Single Object | Batch Version | Use Batch When |
|---|---|---|
asset_import |
asset_import_batch |
Importing 2+ files |
asset_delete |
asset_delete_batch |
Deleting 2+ assets |
asset_move |
asset_move_batch |
Moving 2+ assets |
No batch needed:
asset_duplicate- Duplicate single assetasset_find- Search assets (returns list)asset_create_folder- Create folderasset_refresh- Refresh AssetDatabaseasset_get_info- Get asset informationasset_reimport- Force reimport assetasset_reimport_batch- Reimport multiple assets
Skills
asset_import
Import an external file into the project.
| Parameter | Type | Required | Description |
|---|---|---|---|
sourcePath |
string | Yes | External file path |
destinationPath |
string | Yes | Project destination |
asset_import_batch
Import multiple external files.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
items |
json string | Yes | - | JSON array of per-item objects (see example below) |
items currently expects a JSON string, not a native array.
Returns: {success, totalItems, successCount, failCount, results: [{success, sourcePath, destinationPath}]}
import json
unity_skills.call_skill("asset_import_batch", items=json.dumps([
{"sourcePath": "C:/Downloads/tex1.png", "destinationPath": "Assets/Textures/tex1.png"},
{"sourcePath": "C:/Downloads/tex2.png", "destinationPath": "Assets/Textures/tex2.png"}
]))
asset_delete
Delete an asset from the project.
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset path to delete |
asset_delete_batch
Delete multiple assets.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
items |
json string | Yes | - | JSON array of per-item objects (see example below) |
items currently expects a JSON string, not a native array.
Returns: {success, totalItems, successCount, failCount, results: [{success, path}]}
import json
unity_skills.call_skill("asset_delete_batch", items=json.dumps([
{"path": "Assets/Textures/old1.png"},
{"path": "Assets/Textures/old2.png"}
]))
asset_move
Move or rename an asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
sourcePath |
string | Yes | Current asset path |
destinationPath |
string | Yes | New path/name |
asset_move_batch
Move multiple assets.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
items |
json string | Yes | - | JSON array of per-item objects (see example below) |
items currently expects a JSON string, not a native array.
Returns: {success, totalItems, successCount, failCount, results: [{success, sourcePath, destinationPath}]}
import json
unity_skills.call_skill("asset_move_batch", items=json.dumps([
{"sourcePath": "Assets/Old/mat1.mat", "destinationPath": "Assets/New/mat1.mat"},
{"sourcePath": "Assets/Old/mat2.mat", "destinationPath": "Assets/New/mat2.mat"}
]))
asset_duplicate
Duplicate an asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset to duplicate |
asset_find
Find assets by search filter.
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
searchFilter |
string | Yes | - | Search query |
limit |
int | No | 50 | Max results to return |
limit |
int | No | 100 | Max results |
Search Filter Syntax:
| Filter | Example | Description |
|---|---|---|
t:Type |
t:Texture2D |
By type |
l:Label |
l:Architecture |
By label |
name |
player |
By name |
| Combined | t:Material player |
Multiple filters |
Returns: {success, count, assets: [path]}
asset_create_folder
Create a folder in the project.
| Parameter | Type | Required | Description |
|---|---|---|---|
folderPath |
string | Yes | Full folder path |
asset_refresh
Refresh the AssetDatabase after external changes.
No parameters.
asset_get_info
Get information about an asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset path |
asset_reimport
Force reimport of an asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset path to reimport |
asset_reimport_batch
Reimport multiple assets matching a pattern.
| Parameter | Type | Required | Description |
|---|---|---|---|
searchFilter |
string | No | AssetDatabase search filter (default *) |
folder |
string | No | Folder root to search (default Assets) |
limit |
int | No | Max assets to reimport (default 100) |
asset_set_labels
Set labels on an asset (overwrites existing labels).
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset path |
labels |
string | Yes | Comma-separated labels (e.g. "ui,icon,hud"). Empty entries are dropped |
Returns: {success, assetPath, labels: [...]}
asset_get_labels
Get the labels currently attached to an asset.
| Parameter | Type | Required | Description |
|---|---|---|---|
assetPath |
string | Yes | Asset path |
Returns: {success, assetPath, labels: [...]}
Minimal Example
import unity_skills
# GOOD: 1 API call instead of 4
unity_skills.call_skill("asset_move_batch", items=[
{"sourcePath": "Assets/tex1.png", "destinationPath": "Assets/Textures/tex1.png"},
{"sourcePath": "Assets/tex2.png", "destinationPath": "Assets/Textures/tex2.png"},
{"sourcePath": "Assets/tex3.png", "destinationPath": "Assets/Textures/tex3.png"},
{"sourcePath": "Assets/tex4.png", "destinationPath": "Assets/Textures/tex4.png"}
])
Best Practices
- Organize assets in logical folders
- Use consistent naming conventions
- Refresh after external file changes
- Use search filters for efficiency
- Backup before bulk delete operations
Exact Signatures
Exact names, parameters, defaults, and returns are defined by GET /skills/schema or unity_skills.get_skill_schema(), not by this file.
More from besty0728/unity-skills
unity-skills
Unity Editor automation via REST API — create scripts, analyze scenes, manage assets, control editor, and orchestrate workflows. Triggers: Unity, Unity Skills, in Unity, automate Unity, editor automation, create script, scene summary, build scene, 全自动模式, full auto, semi-auto, 半自动, Unity自动化, Unity编辑器, Unity技能, 操作Unity,在Unity中.
56unity-uitoolkit
UI Toolkit (UITK) for Unity — create/edit USS stylesheets and UXML layouts, configure UIDocument in scenes. Triggers: UI Toolkit, UITK, UXML, USS, UIDocument, PanelSettings, VisualElement, stylesheet, runtime UI, EditorWindow UI, 界面工具包, UI样式, 样式表, 可视化元素.
22unity-ui
Unity UI creation. Use when users want to create Canvas, Button, Text, Image, or other UI elements. Triggers: UI, canvas, button, text, image, panel, slider, toggle, UGUI, 界面, 按钮, 文本, 面板.
20unity-scriptableobject
ScriptableObject management. Use when users want to create, read, or modify ScriptableObject assets. Triggers: scriptableobject, SO, data asset, config, settings asset, 数据资产, 配置文件.
19unity-editor
Unity Editor control. Use when users want to enter play mode, select objects, undo/redo, or execute menu commands. Triggers: play, stop, pause, select, undo, redo, menu, editor, Unity编辑器, Unity播放, Unity撤销, Unity选择.
18unity-light
Unity lighting control. Use when users want to create or configure lights (Directional, Point, Spot, Area). Triggers: light, lighting, directional light, point light, spot light, shadows, intensity, 灯光, 光照, 阴影.
17