Loading...
Loading...
AI-powered scene operations: SQL-like object queries, automatic spatial layout, and reference auto-binding. Use when users want to find objects by property conditions, arrange objects in grid/circle/line, or auto-wire serialized references. Triggers: query, find by property, layout, auto-bind, smart, 查询, 自动布局, 自动绑定.
npx skill4agent add besty0728/unity-skills unity-smartsmart_createsmart_buildsmart_searchsmart_querysmart_movesmart_snap_to_gridsmart_align_to_groundgameobjectgameobject_findscene_find_objectssmart_query| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Component type (Light, Camera, MeshRenderer) |
| string | Yes | - | Property to query (intensity, enabled, etc.) |
| string | No | "==" | ==, !=, >, <, >=, <=, contains |
| string | No | null | Value to compare |
| int | No | 50 | Max results |
| string | No | null | Unsupported shorthand; if provided alone returns a guidance error |
# Find all lights with intensity > 2
call_skill("smart_scene_query", componentName="Light", propertyName="intensity", op=">", value="2")| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | "Linear" | Linear, Grid, Circle, Arc |
| string | No | "X" | X, Y, Z, -X, -Y, -Z |
| float | No | 2.0 | Space between items (or radius) |
| int | No | 3 | For Grid layout |
| float | No | 180 | For Arc layout (degrees) |
| bool | No | false | Rotate to face center |
# Arrange selected objects in a circle
call_skill("smart_scene_layout", layoutType="Circle", spacing=5)| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Target GameObject |
| string | Yes | - | Component on target |
| string | Yes | - | Field to fill |
| string | No | null | Find by tag |
| string | No | null | Find by name contains |
| bool | No | false | Append instead of replace |
# Fill GameManager.spawns with all SpawnPoint tagged objects
call_skill("smart_reference_bind", targetName="GameManager", componentName="GameController", fieldName="spawns", sourceTag="SpawnPoint")smart_scene_query_spatial| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | Yes | - | Center X coordinate |
| float | Yes | - | Center Y coordinate |
| float | Yes | - | Center Z coordinate |
| float | No | 10 | Search sphere radius |
| string | No | null | Only include objects with this component |
| int | No | 50 | Max results |
{ success, count, center, radius, results }smart_align_to_ground| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | No | 100 | Maximum raycast distance |
| bool | No | false | Align rotation to surface normal |
{ success, aligned, total }smart_distribute| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | No | "X" | X, Y, Z, -X, -Y, -Z |
{ success, distributed, axis }smart_snap_to_grid| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | No | 1 | Grid cell size |
{ success, snapped, gridSize }smart_randomize_transform| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| float | No | 0 | Position randomization range |
| float | No | 0 | Rotation randomization range (degrees) |
| float | No | 1 | Minimum uniform scale |
| float | No | 1 | Maximum uniform scale |
{ success, randomized }smart_replace_objects| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Asset path to the replacement prefab |
{ success, replaced, prefab }smart_select_by_component| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
| string | Yes | - | Component type name to search for |
{ success, selected, component }GET /skills/schemaunity_skills.get_skill_schema()