@mseep/anklebreaker-unity-mcp 2.30.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/npm-publish.yml +34 -0
- package/.mcpbignore +9 -0
- package/CHANGELOG.md +85 -0
- package/LICENSE +69 -0
- package/README.md +368 -0
- package/claude-desktop-config.json +12 -0
- package/docs/unity-mcp-architecture.gif +0 -0
- package/docs/unity-mcp-features.gif +0 -0
- package/docs/unity-mcp-showcase-brickbreaker.gif +0 -0
- package/docs/unity-mcp-showcase-castle.gif +0 -0
- package/docs/unity-mcp-showcase-village.gif +0 -0
- package/icon.png +0 -0
- package/manifest.json +178 -0
- package/package.json +26 -0
- package/src/config.js +52 -0
- package/src/index.js +529 -0
- package/src/instance-discovery.js +501 -0
- package/src/state-persistence.js +97 -0
- package/src/tool-tiers.js +348 -0
- package/src/tools/context-tools.js +33 -0
- package/src/tools/editor-tools.js +4521 -0
- package/src/tools/hub-tools.js +96 -0
- package/src/tools/instance-tools.js +114 -0
- package/src/tools/uma-tools.js +627 -0
- package/src/uma-bridge.js +63 -0
- package/src/unity-editor-bridge.js +1690 -0
- package/src/unity-hub.js +125 -0
- package/tests/multi-agent-stress-test.mjs +400 -0
|
@@ -0,0 +1,4521 @@
|
|
|
1
|
+
// AnkleBreaker Unity MCP — Tool definitions for Unity Editor operations (via HTTP bridge)
|
|
2
|
+
import * as bridge from "../unity-editor-bridge.js";
|
|
3
|
+
|
|
4
|
+
export const editorTools = [
|
|
5
|
+
// ─── Connection ───
|
|
6
|
+
{
|
|
7
|
+
name: "unity_editor_ping",
|
|
8
|
+
description: "Check if the Unity Editor bridge is running and responsive. Returns editor version, project name, and connection status.",
|
|
9
|
+
inputSchema: { type: "object", properties: {} },
|
|
10
|
+
handler: async () => JSON.stringify(await bridge.ping(), null, 2),
|
|
11
|
+
},
|
|
12
|
+
{
|
|
13
|
+
name: "unity_editor_state",
|
|
14
|
+
description: "Get the current Unity Editor state: play mode, compilation status, active scene, project path.",
|
|
15
|
+
inputSchema: { type: "object", properties: {} },
|
|
16
|
+
handler: async () => JSON.stringify(await bridge.getEditorState(), null, 2),
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
// ─── Scene Management ───
|
|
20
|
+
{
|
|
21
|
+
name: "unity_scene_info",
|
|
22
|
+
description: "Get information about the currently open scene(s), including name, path, dirty state, and root game objects.",
|
|
23
|
+
inputSchema: { type: "object", properties: {} },
|
|
24
|
+
handler: async () => JSON.stringify(await bridge.getSceneInfo(), null, 2),
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
name: "unity_scene_open",
|
|
28
|
+
description: "Open a scene by its asset path (relative to Assets/).",
|
|
29
|
+
inputSchema: {
|
|
30
|
+
type: "object",
|
|
31
|
+
properties: {
|
|
32
|
+
path: { type: "string", description: "Scene asset path, e.g. 'Assets/Scenes/MainScene.unity'" },
|
|
33
|
+
},
|
|
34
|
+
required: ["path"],
|
|
35
|
+
},
|
|
36
|
+
handler: async ({ path }) => JSON.stringify(await bridge.openScene(path), null, 2),
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
name: "unity_scene_save",
|
|
40
|
+
description: "Save the current scene.",
|
|
41
|
+
inputSchema: { type: "object", properties: {} },
|
|
42
|
+
handler: async () => JSON.stringify(await bridge.saveScene(), null, 2),
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
name: "unity_scene_new",
|
|
46
|
+
description: "Create a new empty scene.",
|
|
47
|
+
inputSchema: { type: "object", properties: {} },
|
|
48
|
+
handler: async () => JSON.stringify(await bridge.newScene(), null, 2),
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
name: "unity_scene_hierarchy",
|
|
52
|
+
description: "Get the full hierarchy tree of all GameObjects in the active scene, including their components and children.",
|
|
53
|
+
inputSchema: {
|
|
54
|
+
type: "object",
|
|
55
|
+
properties: {
|
|
56
|
+
maxDepth: { type: "number", description: "Maximum depth to traverse (default: 10)" },
|
|
57
|
+
maxNodes: { type: "number", description: "Maximum total nodes to return (default: 5000). Use lower values for very large scenes to avoid timeouts." },
|
|
58
|
+
parentPath: { type: "string", description: "Only return hierarchy under this GameObject path (e.g. 'Canvas/Panel'). Useful for exploring specific subtrees in large scenes." },
|
|
59
|
+
},
|
|
60
|
+
},
|
|
61
|
+
handler: async (params) => JSON.stringify(await bridge.getHierarchy(params), null, 2),
|
|
62
|
+
},
|
|
63
|
+
|
|
64
|
+
// ─── GameObject Operations ───
|
|
65
|
+
{
|
|
66
|
+
name: "unity_gameobject_create",
|
|
67
|
+
description: "Create a new GameObject in the scene. Can specify primitive type (Cube, Sphere, Capsule, Cylinder, Plane, Quad), parent, and initial transform.",
|
|
68
|
+
inputSchema: {
|
|
69
|
+
type: "object",
|
|
70
|
+
properties: {
|
|
71
|
+
name: { type: "string", description: "Name for the new GameObject" },
|
|
72
|
+
primitiveType: {
|
|
73
|
+
type: "string",
|
|
74
|
+
description: "Optional primitive: Cube, Sphere, Capsule, Cylinder, Plane, Quad, Empty",
|
|
75
|
+
enum: ["Cube", "Sphere", "Capsule", "Cylinder", "Plane", "Quad", "Empty"],
|
|
76
|
+
},
|
|
77
|
+
parent: { type: "string", description: "Path or name of parent GameObject (optional)" },
|
|
78
|
+
position: {
|
|
79
|
+
type: "object",
|
|
80
|
+
properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } },
|
|
81
|
+
},
|
|
82
|
+
rotation: {
|
|
83
|
+
type: "object",
|
|
84
|
+
properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } },
|
|
85
|
+
},
|
|
86
|
+
scale: {
|
|
87
|
+
type: "object",
|
|
88
|
+
properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } },
|
|
89
|
+
},
|
|
90
|
+
},
|
|
91
|
+
required: ["name"],
|
|
92
|
+
},
|
|
93
|
+
handler: async (params) => JSON.stringify(await bridge.createGameObject(params), null, 2),
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
name: "unity_gameobject_delete",
|
|
97
|
+
description: "Delete a GameObject from the scene by path or name.",
|
|
98
|
+
inputSchema: {
|
|
99
|
+
type: "object",
|
|
100
|
+
properties: {
|
|
101
|
+
path: { type: "string", description: "Hierarchy path or name of the GameObject to delete" },
|
|
102
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
103
|
+
},
|
|
104
|
+
},
|
|
105
|
+
handler: async (params) => JSON.stringify(await bridge.deleteGameObject(params), null, 2),
|
|
106
|
+
},
|
|
107
|
+
{
|
|
108
|
+
name: "unity_gameobject_info",
|
|
109
|
+
description: "Get detailed info about a specific GameObject: transform, components, children, active state, tags, layer.",
|
|
110
|
+
inputSchema: {
|
|
111
|
+
type: "object",
|
|
112
|
+
properties: {
|
|
113
|
+
path: { type: "string", description: "Hierarchy path or name" },
|
|
114
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
115
|
+
},
|
|
116
|
+
},
|
|
117
|
+
handler: async (params) => JSON.stringify(await bridge.getGameObjectInfo(params), null, 2),
|
|
118
|
+
},
|
|
119
|
+
{
|
|
120
|
+
name: "unity_gameobject_set_transform",
|
|
121
|
+
description: "Set the transform (position, rotation, scale) of a GameObject.",
|
|
122
|
+
inputSchema: {
|
|
123
|
+
type: "object",
|
|
124
|
+
properties: {
|
|
125
|
+
path: { type: "string", description: "Hierarchy path or name" },
|
|
126
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
127
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
128
|
+
rotation: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
129
|
+
scale: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
130
|
+
local: { type: "boolean", description: "If true, set local transform instead of world (default: false)" },
|
|
131
|
+
},
|
|
132
|
+
},
|
|
133
|
+
handler: async (params) => JSON.stringify(await bridge.setTransform(params), null, 2),
|
|
134
|
+
},
|
|
135
|
+
|
|
136
|
+
// ─── Component Operations ───
|
|
137
|
+
{
|
|
138
|
+
name: "unity_component_add",
|
|
139
|
+
description: "Add a component to a GameObject. Supports built-in types (Rigidbody, BoxCollider, AudioSource, Light, Camera, etc.) and custom scripts.",
|
|
140
|
+
inputSchema: {
|
|
141
|
+
type: "object",
|
|
142
|
+
properties: {
|
|
143
|
+
gameObjectPath: { type: "string", description: "Path or name of the target GameObject" },
|
|
144
|
+
componentType: { type: "string", description: "Full type name, e.g. 'Rigidbody', 'BoxCollider', 'MyNamespace.MyScript'" },
|
|
145
|
+
},
|
|
146
|
+
required: ["gameObjectPath", "componentType"],
|
|
147
|
+
},
|
|
148
|
+
handler: async (params) => JSON.stringify(await bridge.addComponent(params), null, 2),
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
name: "unity_component_remove",
|
|
152
|
+
description: "Remove a component from a GameObject.",
|
|
153
|
+
inputSchema: {
|
|
154
|
+
type: "object",
|
|
155
|
+
properties: {
|
|
156
|
+
gameObjectPath: { type: "string", description: "Path or name of the target GameObject" },
|
|
157
|
+
componentType: { type: "string", description: "Type name of the component to remove" },
|
|
158
|
+
index: { type: "number", description: "Index if multiple components of same type (default: 0)" },
|
|
159
|
+
},
|
|
160
|
+
required: ["gameObjectPath", "componentType"],
|
|
161
|
+
},
|
|
162
|
+
handler: async (params) => JSON.stringify(await bridge.removeComponent(params), null, 2),
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
name: "unity_component_get_properties",
|
|
166
|
+
description: "Get all serialized properties of a component on a GameObject.",
|
|
167
|
+
inputSchema: {
|
|
168
|
+
type: "object",
|
|
169
|
+
properties: {
|
|
170
|
+
gameObjectPath: { type: "string", description: "Path or name of the target GameObject" },
|
|
171
|
+
componentType: { type: "string", description: "Component type name" },
|
|
172
|
+
},
|
|
173
|
+
required: ["gameObjectPath", "componentType"],
|
|
174
|
+
},
|
|
175
|
+
handler: async (params) => JSON.stringify(await bridge.getComponentProperties(params), null, 2),
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
name: "unity_component_set_property",
|
|
179
|
+
description: "Set a property value on a component. Supports floats, ints, strings, bools, vectors, colors, and object references. For ObjectReference properties, pass value as: an asset path string, a scene object name string, null to clear, or an object with {assetPath}, {instanceId}, or {gameObject, componentType}.",
|
|
180
|
+
inputSchema: {
|
|
181
|
+
type: "object",
|
|
182
|
+
properties: {
|
|
183
|
+
gameObjectPath: { type: "string", description: "Path or name of target GameObject" },
|
|
184
|
+
componentType: { type: "string", description: "Component type name" },
|
|
185
|
+
propertyName: { type: "string", description: "Name of the property to set" },
|
|
186
|
+
value: { description: "Value to set (type depends on property). For ObjectReference: string asset path, string scene object name, null, or {assetPath?, instanceId?, gameObject?, componentType?}" },
|
|
187
|
+
},
|
|
188
|
+
required: ["gameObjectPath", "componentType", "propertyName", "value"],
|
|
189
|
+
},
|
|
190
|
+
handler: async (params) => {
|
|
191
|
+
// Type coercion: MCP clients may send numeric values as strings (e.g. "5.0" instead of 5).
|
|
192
|
+
// The C# plugin's SetSerializedValue uses Convert.ToSingle/ToInt32 which can fail
|
|
193
|
+
// with locale-dependent parsing. Coerce string values that look like numbers here.
|
|
194
|
+
if (params.value !== undefined && params.value !== null && typeof params.value === "string") {
|
|
195
|
+
const trimmed = params.value.trim();
|
|
196
|
+
// Check if it's a numeric string (int or float)
|
|
197
|
+
if (/^-?\d+(\.\d+)?$/.test(trimmed)) {
|
|
198
|
+
params.value = Number(trimmed);
|
|
199
|
+
}
|
|
200
|
+
// Check for boolean strings
|
|
201
|
+
else if (trimmed.toLowerCase() === "true") {
|
|
202
|
+
params.value = true;
|
|
203
|
+
} else if (trimmed.toLowerCase() === "false") {
|
|
204
|
+
params.value = false;
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
return JSON.stringify(await bridge.setComponentProperty(params), null, 2);
|
|
208
|
+
},
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
name: "unity_component_set_reference",
|
|
212
|
+
description: "Set an object reference on a component property. Dedicated tool for wiring references between GameObjects, components, and assets. More powerful than set_property for ObjectReference fields — supports resolution by asset path, scene GameObject name, component type, or instance ID.",
|
|
213
|
+
inputSchema: {
|
|
214
|
+
type: "object",
|
|
215
|
+
properties: {
|
|
216
|
+
path: { type: "string", description: "Hierarchy path or name of the target GameObject" },
|
|
217
|
+
instanceId: { type: "string", description: "Instance ID of the target GameObject (alternative to path)" },
|
|
218
|
+
componentType: { type: "string", description: "Component type containing the property (optional — will auto-search all components)" },
|
|
219
|
+
propertyName: { type: "string", description: "Name of the ObjectReference property to set" },
|
|
220
|
+
assetPath: { type: "string", description: "Asset path to assign (e.g. 'Assets/Materials/MyMat.mat', 'Assets/Prefabs/Enemy.prefab')" },
|
|
221
|
+
referenceGameObject: { type: "string", description: "Name or hierarchy path of a scene GameObject to assign" },
|
|
222
|
+
referenceComponentType: { type: "string", description: "When referencing a scene object, get a specific component instead of the GameObject itself (e.g. 'Camera', 'AudioSource')" },
|
|
223
|
+
referenceInstanceId: { type: "number", description: "Instance ID of the object to assign" },
|
|
224
|
+
clear: { type: "boolean", description: "Set to true to clear/null the reference" },
|
|
225
|
+
},
|
|
226
|
+
required: ["propertyName"],
|
|
227
|
+
},
|
|
228
|
+
handler: async (params) => JSON.stringify(await bridge.setComponentReference(params), null, 2),
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
name: "unity_component_batch_wire",
|
|
232
|
+
description: "Wire multiple object references in a single call. Efficient for setting up many references at once (e.g. wiring a UI manager to all its panels, connecting enemy AI to patrol waypoints). Each entry specifies a target GameObject, property, and reference to assign.",
|
|
233
|
+
inputSchema: {
|
|
234
|
+
type: "object",
|
|
235
|
+
properties: {
|
|
236
|
+
references: {
|
|
237
|
+
type: "array",
|
|
238
|
+
description: "Array of reference assignments to perform",
|
|
239
|
+
items: {
|
|
240
|
+
type: "object",
|
|
241
|
+
properties: {
|
|
242
|
+
path: { type: "string", description: "Target GameObject path or name" },
|
|
243
|
+
instanceId: { type: "string", description: "Target GameObject instance ID" },
|
|
244
|
+
componentType: { type: "string", description: "Component type (optional)" },
|
|
245
|
+
propertyName: { type: "string", description: "Property name to set" },
|
|
246
|
+
assetPath: { type: "string", description: "Asset path to assign" },
|
|
247
|
+
referenceGameObject: { type: "string", description: "Scene GameObject to assign" },
|
|
248
|
+
referenceComponentType: { type: "string", description: "Component type on the referenced GameObject" },
|
|
249
|
+
referenceInstanceId: { type: "number", description: "Instance ID to assign" },
|
|
250
|
+
clear: { type: "boolean", description: "Clear the reference" },
|
|
251
|
+
},
|
|
252
|
+
required: ["propertyName"],
|
|
253
|
+
},
|
|
254
|
+
},
|
|
255
|
+
},
|
|
256
|
+
required: ["references"],
|
|
257
|
+
},
|
|
258
|
+
handler: async (params) => JSON.stringify(await bridge.batchWireReferences(params), null, 2),
|
|
259
|
+
},
|
|
260
|
+
{
|
|
261
|
+
name: "unity_component_get_referenceable",
|
|
262
|
+
description: "Discover what objects can be assigned to an ObjectReference property. Returns matching scene objects and project assets filtered by the expected type. Useful before wiring references to know what's available.",
|
|
263
|
+
inputSchema: {
|
|
264
|
+
type: "object",
|
|
265
|
+
properties: {
|
|
266
|
+
path: { type: "string", description: "Target GameObject path or name" },
|
|
267
|
+
instanceId: { type: "string", description: "Target GameObject instance ID" },
|
|
268
|
+
componentType: { type: "string", description: "Component type containing the property" },
|
|
269
|
+
propertyName: { type: "string", description: "ObjectReference property name to inspect" },
|
|
270
|
+
maxResults: { type: "number", description: "Maximum results to return (default: 50)" },
|
|
271
|
+
},
|
|
272
|
+
required: ["propertyName"],
|
|
273
|
+
},
|
|
274
|
+
handler: async (params) => JSON.stringify(await bridge.getReferenceableObjects(params), null, 2),
|
|
275
|
+
},
|
|
276
|
+
|
|
277
|
+
// ─── Asset Management ───
|
|
278
|
+
{
|
|
279
|
+
name: "unity_asset_list",
|
|
280
|
+
description: "List assets in the project. Can filter by path, type, and search term.",
|
|
281
|
+
inputSchema: {
|
|
282
|
+
type: "object",
|
|
283
|
+
properties: {
|
|
284
|
+
folder: { type: "string", description: "Folder path relative to Assets/ (default: 'Assets')" },
|
|
285
|
+
type: { type: "string", description: "Asset type filter: Script, Scene, Prefab, Material, Texture, AudioClip, AnimationClip, Shader, Font, Mesh, Model" },
|
|
286
|
+
search: { type: "string", description: "Search query string" },
|
|
287
|
+
recursive: { type: "boolean", description: "Search recursively in subfolders (default: true)" },
|
|
288
|
+
maxResults: { type: "number", description: "Maximum assets to return (default: 500). Use lower values for large projects." },
|
|
289
|
+
},
|
|
290
|
+
},
|
|
291
|
+
handler: async (params) => JSON.stringify(await bridge.getAssetList(params), null, 2),
|
|
292
|
+
},
|
|
293
|
+
{
|
|
294
|
+
name: "unity_asset_import",
|
|
295
|
+
description: "Import an external file into the Unity project as an asset.",
|
|
296
|
+
inputSchema: {
|
|
297
|
+
type: "object",
|
|
298
|
+
properties: {
|
|
299
|
+
sourcePath: { type: "string", description: "Absolute path to the source file on disk" },
|
|
300
|
+
destinationPath: { type: "string", description: "Destination path inside Assets/ folder" },
|
|
301
|
+
},
|
|
302
|
+
required: ["sourcePath", "destinationPath"],
|
|
303
|
+
},
|
|
304
|
+
handler: async (params) => JSON.stringify(await bridge.importAsset(params), null, 2),
|
|
305
|
+
},
|
|
306
|
+
{
|
|
307
|
+
name: "unity_asset_delete",
|
|
308
|
+
description: "Delete an asset from the project.",
|
|
309
|
+
inputSchema: {
|
|
310
|
+
type: "object",
|
|
311
|
+
properties: {
|
|
312
|
+
path: { type: "string", description: "Asset path relative to project root (e.g. 'Assets/Scripts/MyScript.cs')" },
|
|
313
|
+
},
|
|
314
|
+
required: ["path"],
|
|
315
|
+
},
|
|
316
|
+
handler: async (params) => JSON.stringify(await bridge.deleteAsset(params), null, 2),
|
|
317
|
+
},
|
|
318
|
+
{
|
|
319
|
+
name: "unity_asset_create_prefab",
|
|
320
|
+
description: "Create a prefab from an existing GameObject in the scene.",
|
|
321
|
+
inputSchema: {
|
|
322
|
+
type: "object",
|
|
323
|
+
properties: {
|
|
324
|
+
gameObjectPath: { type: "string", description: "Path of the source GameObject in the hierarchy" },
|
|
325
|
+
savePath: { type: "string", description: "Where to save the prefab (e.g. 'Assets/Prefabs/MyPrefab.prefab')" },
|
|
326
|
+
},
|
|
327
|
+
required: ["gameObjectPath", "savePath"],
|
|
328
|
+
},
|
|
329
|
+
handler: async (params) => JSON.stringify(await bridge.createPrefab(params), null, 2),
|
|
330
|
+
},
|
|
331
|
+
{
|
|
332
|
+
name: "unity_asset_instantiate_prefab",
|
|
333
|
+
description: "Instantiate a prefab into the current scene.",
|
|
334
|
+
inputSchema: {
|
|
335
|
+
type: "object",
|
|
336
|
+
properties: {
|
|
337
|
+
prefabPath: { type: "string", description: "Path to the prefab asset (e.g. 'Assets/Prefabs/Enemy.prefab')" },
|
|
338
|
+
name: { type: "string", description: "Name for the instantiated object" },
|
|
339
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
340
|
+
rotation: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
341
|
+
parent: { type: "string", description: "Parent GameObject path (optional)" },
|
|
342
|
+
},
|
|
343
|
+
required: ["prefabPath"],
|
|
344
|
+
},
|
|
345
|
+
handler: async (params) => JSON.stringify(await bridge.instantiatePrefab(params), null, 2),
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
// ─── Script / Code Operations ───
|
|
349
|
+
{
|
|
350
|
+
name: "unity_script_create",
|
|
351
|
+
description: "Create a new C# script file in the project with the given content.",
|
|
352
|
+
inputSchema: {
|
|
353
|
+
type: "object",
|
|
354
|
+
properties: {
|
|
355
|
+
path: { type: "string", description: "Asset path for the script (e.g. 'Assets/Scripts/PlayerController.cs')" },
|
|
356
|
+
content: { type: "string", description: "Full C# source code content" },
|
|
357
|
+
className: { type: "string", description: "Class name (defaults to filename without extension)" },
|
|
358
|
+
},
|
|
359
|
+
required: ["path", "content"],
|
|
360
|
+
},
|
|
361
|
+
handler: async (params) => JSON.stringify(await bridge.createScript(params), null, 2),
|
|
362
|
+
},
|
|
363
|
+
{
|
|
364
|
+
name: "unity_script_read",
|
|
365
|
+
description: "Read the contents of a C# script file from the project.",
|
|
366
|
+
inputSchema: {
|
|
367
|
+
type: "object",
|
|
368
|
+
properties: {
|
|
369
|
+
path: { type: "string", description: "Asset path of the script" },
|
|
370
|
+
},
|
|
371
|
+
required: ["path"],
|
|
372
|
+
},
|
|
373
|
+
handler: async (params) => JSON.stringify(await bridge.readScript(params), null, 2),
|
|
374
|
+
},
|
|
375
|
+
{
|
|
376
|
+
name: "unity_script_update",
|
|
377
|
+
description: "Update the contents of an existing C# script file.",
|
|
378
|
+
inputSchema: {
|
|
379
|
+
type: "object",
|
|
380
|
+
properties: {
|
|
381
|
+
path: { type: "string", description: "Asset path of the script" },
|
|
382
|
+
content: { type: "string", description: "New full C# source code content" },
|
|
383
|
+
},
|
|
384
|
+
required: ["path", "content"],
|
|
385
|
+
},
|
|
386
|
+
handler: async (params) => JSON.stringify(await bridge.updateScript(params), null, 2),
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
name: "unity_execute_code",
|
|
390
|
+
description: "Execute arbitrary C# code inside the Unity Editor. The code runs in the editor context with access to all Unity APIs. Useful for one-off operations, queries, and automation. Return values are serialized to JSON.",
|
|
391
|
+
inputSchema: {
|
|
392
|
+
type: "object",
|
|
393
|
+
properties: {
|
|
394
|
+
code: { type: "string", description: "C# code to execute. Must be a valid method body. Access UnityEngine and UnityEditor namespaces. Use 'return' to send data back." },
|
|
395
|
+
},
|
|
396
|
+
required: ["code"],
|
|
397
|
+
},
|
|
398
|
+
handler: async ({ code }) => JSON.stringify(await bridge.executeCode(code), null, 2),
|
|
399
|
+
},
|
|
400
|
+
|
|
401
|
+
// ─── Material / Rendering ───
|
|
402
|
+
{
|
|
403
|
+
name: "unity_material_create",
|
|
404
|
+
description: "Create a new material asset with a specified shader and properties.",
|
|
405
|
+
inputSchema: {
|
|
406
|
+
type: "object",
|
|
407
|
+
properties: {
|
|
408
|
+
path: { type: "string", description: "Save path (e.g. 'Assets/Materials/MyMat.mat')" },
|
|
409
|
+
shader: { type: "string", description: "Shader name (e.g. 'Standard', 'Universal Render Pipeline/Lit')" },
|
|
410
|
+
color: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } } },
|
|
411
|
+
properties: { type: "object", description: "Additional shader properties as key-value pairs" },
|
|
412
|
+
},
|
|
413
|
+
required: ["path"],
|
|
414
|
+
},
|
|
415
|
+
handler: async (params) => JSON.stringify(await bridge.createMaterial(params), null, 2),
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
name: "unity_renderer_set_material",
|
|
419
|
+
description: "Assign a material to a GameObject's renderer.",
|
|
420
|
+
inputSchema: {
|
|
421
|
+
type: "object",
|
|
422
|
+
properties: {
|
|
423
|
+
gameObjectPath: { type: "string", description: "Path to the target GameObject" },
|
|
424
|
+
materialPath: { type: "string", description: "Path to the material asset" },
|
|
425
|
+
materialIndex: { type: "number", description: "Material slot index (default: 0)" },
|
|
426
|
+
},
|
|
427
|
+
required: ["gameObjectPath", "materialPath"],
|
|
428
|
+
},
|
|
429
|
+
handler: async (params) => JSON.stringify(await bridge.setMaterial(params), null, 2),
|
|
430
|
+
},
|
|
431
|
+
|
|
432
|
+
// ─── Build ───
|
|
433
|
+
{
|
|
434
|
+
name: "unity_build",
|
|
435
|
+
description: "Start a build of the Unity project for a target platform.",
|
|
436
|
+
inputSchema: {
|
|
437
|
+
type: "object",
|
|
438
|
+
properties: {
|
|
439
|
+
target: {
|
|
440
|
+
type: "string",
|
|
441
|
+
description: "Build target platform",
|
|
442
|
+
enum: ["StandaloneWindows64", "StandaloneOSX", "StandaloneLinux64", "Android", "iOS", "WebGL"],
|
|
443
|
+
},
|
|
444
|
+
outputPath: { type: "string", description: "Output path for the build" },
|
|
445
|
+
scenes: {
|
|
446
|
+
type: "array",
|
|
447
|
+
items: { type: "string" },
|
|
448
|
+
description: "Scene paths to include (default: scenes in build settings)",
|
|
449
|
+
},
|
|
450
|
+
developmentBuild: { type: "boolean", description: "Enable development build (default: false)" },
|
|
451
|
+
},
|
|
452
|
+
required: ["target", "outputPath"],
|
|
453
|
+
},
|
|
454
|
+
handler: async (params) => JSON.stringify(await bridge.buildProject(params), null, 2),
|
|
455
|
+
},
|
|
456
|
+
|
|
457
|
+
// ─── Console / Logging ───
|
|
458
|
+
{
|
|
459
|
+
name: "unity_console_log",
|
|
460
|
+
description: "Get recent Unity console log messages (errors, warnings, info). Useful for debugging.",
|
|
461
|
+
inputSchema: {
|
|
462
|
+
type: "object",
|
|
463
|
+
properties: {
|
|
464
|
+
count: { type: "number", description: "Number of recent messages to retrieve (default: 50)" },
|
|
465
|
+
type: { type: "string", description: "Filter: 'error', 'warning', 'info', or 'all' (default: 'all')" },
|
|
466
|
+
},
|
|
467
|
+
},
|
|
468
|
+
handler: async (params) => JSON.stringify(await bridge.getConsoleLog(params), null, 2),
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
name: "unity_console_clear",
|
|
472
|
+
description: "Clear the Unity console log.",
|
|
473
|
+
inputSchema: { type: "object", properties: {} },
|
|
474
|
+
handler: async () => JSON.stringify(await bridge.clearConsoleLog(), null, 2),
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
// ─── Play Mode ───
|
|
478
|
+
// ─── Compilation ───
|
|
479
|
+
{
|
|
480
|
+
name: "unity_get_compilation_errors",
|
|
481
|
+
description:
|
|
482
|
+
"Get C# compilation errors and warnings from the Unity Editor. " +
|
|
483
|
+
"Uses CompilationPipeline directly — independent of the console log buffer. " +
|
|
484
|
+
"Not affected by console clear or Play Mode log flooding. " +
|
|
485
|
+
"Returns errors from the last compilation cycle. " +
|
|
486
|
+
"Use this instead of unity_console_log when diagnosing script compilation issues.",
|
|
487
|
+
inputSchema: {
|
|
488
|
+
type: "object",
|
|
489
|
+
properties: {
|
|
490
|
+
count: { type: "number", description: "Max number of entries to retrieve (default: 50)" },
|
|
491
|
+
severity: { type: "string", description: "Filter: 'error', 'warning', or 'all' (default: 'all')" },
|
|
492
|
+
},
|
|
493
|
+
},
|
|
494
|
+
handler: async (params) => JSON.stringify(await bridge.getCompilationErrors(params), null, 2),
|
|
495
|
+
},
|
|
496
|
+
|
|
497
|
+
// ─── Play Mode ───
|
|
498
|
+
{
|
|
499
|
+
name: "unity_play_mode",
|
|
500
|
+
description: "Control Unity Editor play mode: enter play, pause, or stop.",
|
|
501
|
+
inputSchema: {
|
|
502
|
+
type: "object",
|
|
503
|
+
properties: {
|
|
504
|
+
action: { type: "string", enum: ["play", "pause", "stop"], description: "Play mode action" },
|
|
505
|
+
},
|
|
506
|
+
required: ["action"],
|
|
507
|
+
},
|
|
508
|
+
handler: async ({ action }) => JSON.stringify(await bridge.playMode(action), null, 2),
|
|
509
|
+
},
|
|
510
|
+
|
|
511
|
+
// ─── Editor Menu ───
|
|
512
|
+
{
|
|
513
|
+
name: "unity_execute_menu_item",
|
|
514
|
+
description: "Execute a Unity Editor menu command by its path (e.g. 'File/Save', 'GameObject/3D Object/Cube', 'Window/General/Console').",
|
|
515
|
+
inputSchema: {
|
|
516
|
+
type: "object",
|
|
517
|
+
properties: {
|
|
518
|
+
menuPath: { type: "string", description: "Full menu path (e.g. 'Edit/Project Settings...')" },
|
|
519
|
+
},
|
|
520
|
+
required: ["menuPath"],
|
|
521
|
+
},
|
|
522
|
+
handler: async ({ menuPath }) => JSON.stringify(await bridge.executeMenuItem(menuPath), null, 2),
|
|
523
|
+
},
|
|
524
|
+
|
|
525
|
+
// ─── Project Info ───
|
|
526
|
+
{
|
|
527
|
+
name: "unity_project_info",
|
|
528
|
+
description: "Get project information: name, path, Unity version, render pipeline, packages, build settings.",
|
|
529
|
+
inputSchema: { type: "object", properties: {} },
|
|
530
|
+
handler: async () => JSON.stringify(await bridge.getProjectInfo(), null, 2),
|
|
531
|
+
},
|
|
532
|
+
|
|
533
|
+
// ─── Animation ───
|
|
534
|
+
{
|
|
535
|
+
name: "unity_animation_create_controller",
|
|
536
|
+
description: "Create a new Animator Controller asset at the specified path.",
|
|
537
|
+
inputSchema: {
|
|
538
|
+
type: "object",
|
|
539
|
+
properties: {
|
|
540
|
+
path: { type: "string", description: "Asset path for the controller (e.g. 'Assets/Animations/PlayerController.controller')" },
|
|
541
|
+
},
|
|
542
|
+
required: ["path"],
|
|
543
|
+
},
|
|
544
|
+
handler: async (params) => JSON.stringify(await bridge.createAnimatorController(params), null, 2),
|
|
545
|
+
},
|
|
546
|
+
{
|
|
547
|
+
name: "unity_animation_controller_info",
|
|
548
|
+
description: "Get detailed information about an Animator Controller: layers, states, transitions, parameters.",
|
|
549
|
+
inputSchema: {
|
|
550
|
+
type: "object",
|
|
551
|
+
properties: {
|
|
552
|
+
path: { type: "string", description: "Asset path of the Animator Controller" },
|
|
553
|
+
},
|
|
554
|
+
required: ["path"],
|
|
555
|
+
},
|
|
556
|
+
handler: async (params) => JSON.stringify(await bridge.getAnimatorControllerInfo(params), null, 2),
|
|
557
|
+
},
|
|
558
|
+
{
|
|
559
|
+
name: "unity_animation_add_parameter",
|
|
560
|
+
description: "Add a parameter to an Animator Controller (Float, Int, Bool, or Trigger).",
|
|
561
|
+
inputSchema: {
|
|
562
|
+
type: "object",
|
|
563
|
+
properties: {
|
|
564
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
565
|
+
parameterName: { type: "string", description: "Name of the parameter to add" },
|
|
566
|
+
parameterType: { type: "string", enum: ["Float", "Int", "Bool", "Trigger"], description: "Type of the parameter" },
|
|
567
|
+
defaultValue: { description: "Default value for the parameter (not applicable to Trigger)" },
|
|
568
|
+
},
|
|
569
|
+
required: ["controllerPath", "parameterName", "parameterType"],
|
|
570
|
+
},
|
|
571
|
+
handler: async (params) => JSON.stringify(await bridge.addAnimationParameter(params), null, 2),
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
name: "unity_animation_remove_parameter",
|
|
575
|
+
description: "Remove a parameter from an Animator Controller by name.",
|
|
576
|
+
inputSchema: {
|
|
577
|
+
type: "object",
|
|
578
|
+
properties: {
|
|
579
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
580
|
+
parameterName: { type: "string", description: "Name of the parameter to remove" },
|
|
581
|
+
},
|
|
582
|
+
required: ["controllerPath", "parameterName"],
|
|
583
|
+
},
|
|
584
|
+
handler: async (params) => JSON.stringify(await bridge.removeAnimationParameter(params), null, 2),
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
name: "unity_animation_add_state",
|
|
588
|
+
description: "Add a state to an Animator Controller layer. Can optionally assign an animation clip and set as default state.",
|
|
589
|
+
inputSchema: {
|
|
590
|
+
type: "object",
|
|
591
|
+
properties: {
|
|
592
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
593
|
+
stateName: { type: "string", description: "Name for the new state" },
|
|
594
|
+
layerIndex: { type: "number", description: "Layer index (default: 0)" },
|
|
595
|
+
clipPath: { type: "string", description: "Optional asset path of an AnimationClip to assign" },
|
|
596
|
+
speed: { type: "number", description: "Playback speed (default: 1)" },
|
|
597
|
+
isDefault: { type: "boolean", description: "Set as the default state for this layer" },
|
|
598
|
+
},
|
|
599
|
+
required: ["controllerPath", "stateName"],
|
|
600
|
+
},
|
|
601
|
+
handler: async (params) => JSON.stringify(await bridge.addAnimationState(params), null, 2),
|
|
602
|
+
},
|
|
603
|
+
{
|
|
604
|
+
name: "unity_animation_remove_state",
|
|
605
|
+
description: "Remove a state from an Animator Controller layer.",
|
|
606
|
+
inputSchema: {
|
|
607
|
+
type: "object",
|
|
608
|
+
properties: {
|
|
609
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
610
|
+
stateName: { type: "string", description: "Name of the state to remove" },
|
|
611
|
+
layerIndex: { type: "number", description: "Layer index (default: 0)" },
|
|
612
|
+
},
|
|
613
|
+
required: ["controllerPath", "stateName"],
|
|
614
|
+
},
|
|
615
|
+
handler: async (params) => JSON.stringify(await bridge.removeAnimationState(params), null, 2),
|
|
616
|
+
},
|
|
617
|
+
{
|
|
618
|
+
name: "unity_animation_add_transition",
|
|
619
|
+
description: "Add a transition between states in an Animator Controller. Supports conditions, exit time, and AnyState transitions.",
|
|
620
|
+
inputSchema: {
|
|
621
|
+
type: "object",
|
|
622
|
+
properties: {
|
|
623
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
624
|
+
sourceState: { type: "string", description: "Name of the source state (not needed if fromAnyState is true)" },
|
|
625
|
+
destinationState: { type: "string", description: "Name of the destination state" },
|
|
626
|
+
layerIndex: { type: "number", description: "Layer index (default: 0)" },
|
|
627
|
+
fromAnyState: { type: "boolean", description: "Create transition from Any State (default: false)" },
|
|
628
|
+
hasExitTime: { type: "boolean", description: "Whether the transition uses exit time" },
|
|
629
|
+
exitTime: { type: "number", description: "Normalized exit time (0-1)" },
|
|
630
|
+
duration: { type: "number", description: "Transition duration in seconds" },
|
|
631
|
+
offset: { type: "number", description: "Transition offset" },
|
|
632
|
+
hasFixedDuration: { type: "boolean", description: "Whether duration is in fixed time" },
|
|
633
|
+
conditions: {
|
|
634
|
+
type: "array",
|
|
635
|
+
description: "Array of transition conditions",
|
|
636
|
+
items: {
|
|
637
|
+
type: "object",
|
|
638
|
+
properties: {
|
|
639
|
+
parameter: { type: "string", description: "Parameter name" },
|
|
640
|
+
mode: { type: "string", enum: ["If", "IfNot", "Greater", "Less", "Equals", "NotEqual"], description: "Condition mode" },
|
|
641
|
+
threshold: { type: "number", description: "Threshold value for comparison" },
|
|
642
|
+
},
|
|
643
|
+
},
|
|
644
|
+
},
|
|
645
|
+
},
|
|
646
|
+
required: ["controllerPath", "destinationState"],
|
|
647
|
+
},
|
|
648
|
+
handler: async (params) => JSON.stringify(await bridge.addAnimationTransition(params), null, 2),
|
|
649
|
+
},
|
|
650
|
+
{
|
|
651
|
+
name: "unity_animation_create_clip",
|
|
652
|
+
description: "Create a new empty Animation Clip asset.",
|
|
653
|
+
inputSchema: {
|
|
654
|
+
type: "object",
|
|
655
|
+
properties: {
|
|
656
|
+
path: { type: "string", description: "Asset path for the clip (e.g. 'Assets/Animations/Walk.anim')" },
|
|
657
|
+
loop: { type: "boolean", description: "Whether the clip should loop (default: false)" },
|
|
658
|
+
frameRate: { type: "number", description: "Frame rate (default: 60)" },
|
|
659
|
+
},
|
|
660
|
+
required: ["path"],
|
|
661
|
+
},
|
|
662
|
+
handler: async (params) => JSON.stringify(await bridge.createAnimationClip(params), null, 2),
|
|
663
|
+
},
|
|
664
|
+
{
|
|
665
|
+
name: "unity_animation_clip_info",
|
|
666
|
+
description: "Get detailed information about an Animation Clip: curves, length, events, loop settings.",
|
|
667
|
+
inputSchema: {
|
|
668
|
+
type: "object",
|
|
669
|
+
properties: {
|
|
670
|
+
path: { type: "string", description: "Asset path of the Animation Clip" },
|
|
671
|
+
},
|
|
672
|
+
required: ["path"],
|
|
673
|
+
},
|
|
674
|
+
handler: async (params) => JSON.stringify(await bridge.getAnimationClipInfo(params), null, 2),
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
name: "unity_animation_set_clip_curve",
|
|
678
|
+
description: "Set an animation curve on a clip. Define keyframes to animate any property (position, rotation, scale, custom).",
|
|
679
|
+
inputSchema: {
|
|
680
|
+
type: "object",
|
|
681
|
+
properties: {
|
|
682
|
+
clipPath: { type: "string", description: "Asset path of the Animation Clip" },
|
|
683
|
+
relativePath: { type: "string", description: "Relative path to the animated object (empty for root)" },
|
|
684
|
+
propertyName: { type: "string", description: "Property to animate (e.g. 'localPosition.x', 'm_LocalScale.y')" },
|
|
685
|
+
type: { type: "string", description: "Component type (default: 'Transform')" },
|
|
686
|
+
keyframes: {
|
|
687
|
+
type: "array",
|
|
688
|
+
description: "Array of keyframes with time and value",
|
|
689
|
+
items: {
|
|
690
|
+
type: "object",
|
|
691
|
+
properties: {
|
|
692
|
+
time: { type: "number", description: "Time in seconds" },
|
|
693
|
+
value: { type: "number", description: "Value at this keyframe" },
|
|
694
|
+
},
|
|
695
|
+
},
|
|
696
|
+
},
|
|
697
|
+
},
|
|
698
|
+
required: ["clipPath", "propertyName", "keyframes"],
|
|
699
|
+
},
|
|
700
|
+
handler: async (params) => JSON.stringify(await bridge.setAnimationClipCurve(params), null, 2),
|
|
701
|
+
},
|
|
702
|
+
{
|
|
703
|
+
name: "unity_animation_add_layer",
|
|
704
|
+
description: "Add a new layer to an Animator Controller.",
|
|
705
|
+
inputSchema: {
|
|
706
|
+
type: "object",
|
|
707
|
+
properties: {
|
|
708
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
709
|
+
layerName: { type: "string", description: "Name for the new layer" },
|
|
710
|
+
weight: { type: "number", description: "Layer weight (0-1, default: 1)" },
|
|
711
|
+
},
|
|
712
|
+
required: ["controllerPath", "layerName"],
|
|
713
|
+
},
|
|
714
|
+
handler: async (params) => JSON.stringify(await bridge.addAnimationLayer(params), null, 2),
|
|
715
|
+
},
|
|
716
|
+
{
|
|
717
|
+
name: "unity_animation_assign_controller",
|
|
718
|
+
description: "Assign an Animator Controller to a GameObject (adds Animator component if needed).",
|
|
719
|
+
inputSchema: {
|
|
720
|
+
type: "object",
|
|
721
|
+
properties: {
|
|
722
|
+
path: { type: "string", description: "Hierarchy path or name of the target GameObject" },
|
|
723
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
724
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller to assign" },
|
|
725
|
+
},
|
|
726
|
+
required: ["controllerPath"],
|
|
727
|
+
},
|
|
728
|
+
handler: async (params) => JSON.stringify(await bridge.assignAnimatorController(params), null, 2),
|
|
729
|
+
},
|
|
730
|
+
{
|
|
731
|
+
name: "unity_animation_get_curve_keyframes",
|
|
732
|
+
description: "Get all keyframes from an animation curve binding with full tangent data (inTangent, outTangent, inWeight, outWeight, weightedMode). Essential for precise animation editing.",
|
|
733
|
+
inputSchema: {
|
|
734
|
+
type: "object",
|
|
735
|
+
properties: {
|
|
736
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
737
|
+
relativePath: { type: "string", description: "Relative path of the animated object (empty for root)" },
|
|
738
|
+
propertyName: { type: "string", description: "Property name (e.g., 'localPosition.x', 'm_LocalRotation.x')" },
|
|
739
|
+
typeName: { type: "string", description: "Component type name (e.g., 'Transform', 'SpriteRenderer')" },
|
|
740
|
+
},
|
|
741
|
+
required: ["clipPath", "propertyName", "typeName"],
|
|
742
|
+
},
|
|
743
|
+
handler: async (params) => JSON.stringify(await bridge.getCurveKeyframes(params), null, 2),
|
|
744
|
+
},
|
|
745
|
+
{
|
|
746
|
+
name: "unity_animation_remove_curve",
|
|
747
|
+
description: "Remove an entire animation curve binding from a clip. Useful for cleaning up or restructuring animations.",
|
|
748
|
+
inputSchema: {
|
|
749
|
+
type: "object",
|
|
750
|
+
properties: {
|
|
751
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
752
|
+
relativePath: { type: "string", description: "Relative path of the animated object (empty for root)" },
|
|
753
|
+
propertyName: { type: "string", description: "Property name to remove" },
|
|
754
|
+
typeName: { type: "string", description: "Component type name" },
|
|
755
|
+
},
|
|
756
|
+
required: ["clipPath", "propertyName", "typeName"],
|
|
757
|
+
},
|
|
758
|
+
handler: async (params) => JSON.stringify(await bridge.removeCurve(params), null, 2),
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
name: "unity_animation_add_keyframe",
|
|
762
|
+
description: "Add a keyframe to an animation curve with full tangent and weight control. Creates the curve if it doesn't exist yet. Supports all weighted tangent modes.",
|
|
763
|
+
inputSchema: {
|
|
764
|
+
type: "object",
|
|
765
|
+
properties: {
|
|
766
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
767
|
+
relativePath: { type: "string", description: "Relative path of the animated object (empty for root)" },
|
|
768
|
+
propertyName: { type: "string", description: "Property name (e.g., 'localPosition.x')" },
|
|
769
|
+
typeName: { type: "string", description: "Component type name (e.g., 'Transform')" },
|
|
770
|
+
time: { type: "number", description: "Time in seconds for the keyframe" },
|
|
771
|
+
value: { type: "number", description: "Value at this keyframe" },
|
|
772
|
+
inTangent: { type: "number", description: "Incoming tangent slope (optional, default 0)" },
|
|
773
|
+
outTangent: { type: "number", description: "Outgoing tangent slope (optional, default 0)" },
|
|
774
|
+
inWeight: { type: "number", description: "Incoming tangent weight 0-1 (optional)" },
|
|
775
|
+
outWeight: { type: "number", description: "Outgoing tangent weight 0-1 (optional)" },
|
|
776
|
+
weightedMode: { type: "string", description: "Weighted mode: None, In, Out, Both (optional)" },
|
|
777
|
+
},
|
|
778
|
+
required: ["clipPath", "propertyName", "typeName", "time", "value"],
|
|
779
|
+
},
|
|
780
|
+
handler: async (params) => JSON.stringify(await bridge.addKeyframe(params), null, 2),
|
|
781
|
+
},
|
|
782
|
+
{
|
|
783
|
+
name: "unity_animation_remove_keyframe",
|
|
784
|
+
description: "Remove a keyframe from an animation curve by its index. Use get_curve_keyframes first to find the index.",
|
|
785
|
+
inputSchema: {
|
|
786
|
+
type: "object",
|
|
787
|
+
properties: {
|
|
788
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
789
|
+
relativePath: { type: "string", description: "Relative path of the animated object" },
|
|
790
|
+
propertyName: { type: "string", description: "Property name" },
|
|
791
|
+
typeName: { type: "string", description: "Component type name" },
|
|
792
|
+
keyframeIndex: { type: "number", description: "Zero-based index of the keyframe to remove" },
|
|
793
|
+
},
|
|
794
|
+
required: ["clipPath", "propertyName", "typeName", "keyframeIndex"],
|
|
795
|
+
},
|
|
796
|
+
handler: async (params) => JSON.stringify(await bridge.removeKeyframe(params), null, 2),
|
|
797
|
+
},
|
|
798
|
+
{
|
|
799
|
+
name: "unity_animation_add_event",
|
|
800
|
+
description: "Add an animation event that calls a function at a specific time during playback. Can pass string, int, or float parameters.",
|
|
801
|
+
inputSchema: {
|
|
802
|
+
type: "object",
|
|
803
|
+
properties: {
|
|
804
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
805
|
+
functionName: { type: "string", description: "Name of the function to call on the animated GameObject" },
|
|
806
|
+
time: { type: "number", description: "Time in seconds when the event fires" },
|
|
807
|
+
stringParameter: { type: "string", description: "String parameter to pass (optional)" },
|
|
808
|
+
intParameter: { type: "number", description: "Integer parameter to pass (optional)" },
|
|
809
|
+
floatParameter: { type: "number", description: "Float parameter to pass (optional)" },
|
|
810
|
+
},
|
|
811
|
+
required: ["clipPath", "functionName", "time"],
|
|
812
|
+
},
|
|
813
|
+
handler: async (params) => JSON.stringify(await bridge.addAnimationEvent(params), null, 2),
|
|
814
|
+
},
|
|
815
|
+
{
|
|
816
|
+
name: "unity_animation_remove_event",
|
|
817
|
+
description: "Remove an animation event by its index. Use get_animation_events first to find the index.",
|
|
818
|
+
inputSchema: {
|
|
819
|
+
type: "object",
|
|
820
|
+
properties: {
|
|
821
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
822
|
+
eventIndex: { type: "number", description: "Zero-based index of the event to remove" },
|
|
823
|
+
},
|
|
824
|
+
required: ["clipPath", "eventIndex"],
|
|
825
|
+
},
|
|
826
|
+
handler: async (params) => JSON.stringify(await bridge.removeAnimationEvent(params), null, 2),
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
name: "unity_animation_get_events",
|
|
830
|
+
description: "List all animation events on a clip with their function names, times, and parameters.",
|
|
831
|
+
inputSchema: {
|
|
832
|
+
type: "object",
|
|
833
|
+
properties: {
|
|
834
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
835
|
+
},
|
|
836
|
+
required: ["clipPath"],
|
|
837
|
+
},
|
|
838
|
+
handler: async (params) => JSON.stringify(await bridge.getAnimationEvents(params), null, 2),
|
|
839
|
+
},
|
|
840
|
+
{
|
|
841
|
+
name: "unity_animation_set_clip_settings",
|
|
842
|
+
description: "Set animation clip settings: looping, root motion, mirroring, speed, frame rate, and more.",
|
|
843
|
+
inputSchema: {
|
|
844
|
+
type: "object",
|
|
845
|
+
properties: {
|
|
846
|
+
clipPath: { type: "string", description: "Asset path of the AnimationClip" },
|
|
847
|
+
loopTime: { type: "boolean", description: "Whether the animation loops" },
|
|
848
|
+
loopBlend: { type: "boolean", description: "Loop blend for seamless looping" },
|
|
849
|
+
loopBlendOrientation: { type: "boolean", description: "Loop blend orientation" },
|
|
850
|
+
keepOriginalOrientation: { type: "boolean", description: "Keep original orientation" },
|
|
851
|
+
keepOriginalPositionY: { type: "boolean", description: "Keep original Y position" },
|
|
852
|
+
keepOriginalPositionXZ: { type: "boolean", description: "Keep original XZ position" },
|
|
853
|
+
mirror: { type: "boolean", description: "Mirror the animation" },
|
|
854
|
+
startTime: { type: "number", description: "Clip start time" },
|
|
855
|
+
stopTime: { type: "number", description: "Clip stop time" },
|
|
856
|
+
level: { type: "number", description: "Height offset level" },
|
|
857
|
+
frameRate: { type: "number", description: "Frame rate (e.g., 30, 60)" },
|
|
858
|
+
},
|
|
859
|
+
required: ["clipPath"],
|
|
860
|
+
},
|
|
861
|
+
handler: async (params) => JSON.stringify(await bridge.setClipSettings(params), null, 2),
|
|
862
|
+
},
|
|
863
|
+
{
|
|
864
|
+
name: "unity_animation_remove_transition",
|
|
865
|
+
description: "Remove a transition from an Animator Controller state. Can target by source/destination names or by index.",
|
|
866
|
+
inputSchema: {
|
|
867
|
+
type: "object",
|
|
868
|
+
properties: {
|
|
869
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
870
|
+
layerIndex: { type: "number", description: "Layer index (default 0)" },
|
|
871
|
+
sourceState: { type: "string", description: "Name of the source state (use 'AnyState' for any-state transitions)" },
|
|
872
|
+
destinationState: { type: "string", description: "Name of the destination state (helps identify which transition)" },
|
|
873
|
+
transitionIndex: { type: "number", description: "Index of the transition on the source state (alternative to destinationState)" },
|
|
874
|
+
},
|
|
875
|
+
required: ["controllerPath", "sourceState"],
|
|
876
|
+
},
|
|
877
|
+
handler: async (params) => JSON.stringify(await bridge.removeAnimationTransition(params), null, 2),
|
|
878
|
+
},
|
|
879
|
+
{
|
|
880
|
+
name: "unity_animation_remove_layer",
|
|
881
|
+
description: "Remove a layer from an Animator Controller by index. Cannot remove the base layer (index 0).",
|
|
882
|
+
inputSchema: {
|
|
883
|
+
type: "object",
|
|
884
|
+
properties: {
|
|
885
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
886
|
+
layerIndex: { type: "number", description: "Index of the layer to remove (must be > 0)" },
|
|
887
|
+
},
|
|
888
|
+
required: ["controllerPath", "layerIndex"],
|
|
889
|
+
},
|
|
890
|
+
handler: async (params) => JSON.stringify(await bridge.removeAnimationLayer(params), null, 2),
|
|
891
|
+
},
|
|
892
|
+
{
|
|
893
|
+
name: "unity_animation_create_blend_tree",
|
|
894
|
+
description: "Create a blend tree in an Animator Controller for smooth blending between animations. Supports 1D, 2D (FreeformDirectional, FreeformCartesian, SimpleDirectional), and Direct blend types.",
|
|
895
|
+
inputSchema: {
|
|
896
|
+
type: "object",
|
|
897
|
+
properties: {
|
|
898
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
899
|
+
layerIndex: { type: "number", description: "Layer index (default 0)" },
|
|
900
|
+
blendTreeName: { type: "string", description: "Name for the blend tree state" },
|
|
901
|
+
blendType: { type: "string", description: "Blend type: Simple1D, FreeformDirectional2D, FreeformCartesian2D, SimpleDirectional2D, Direct (default Simple1D)" },
|
|
902
|
+
blendParameter: { type: "string", description: "Name of the blend parameter" },
|
|
903
|
+
blendParameterY: { type: "string", description: "Y-axis blend parameter for 2D types" },
|
|
904
|
+
motions: {
|
|
905
|
+
type: "array",
|
|
906
|
+
description: "Array of motion entries with clipPath, threshold (1D), position (2D {x,y}), timeScale",
|
|
907
|
+
items: {
|
|
908
|
+
type: "object",
|
|
909
|
+
properties: {
|
|
910
|
+
clipPath: { type: "string" },
|
|
911
|
+
threshold: { type: "number" },
|
|
912
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" } } },
|
|
913
|
+
timeScale: { type: "number" },
|
|
914
|
+
},
|
|
915
|
+
},
|
|
916
|
+
},
|
|
917
|
+
},
|
|
918
|
+
required: ["controllerPath", "blendTreeName", "blendParameter"],
|
|
919
|
+
},
|
|
920
|
+
handler: async (params) => JSON.stringify(await bridge.createBlendTree(params), null, 2),
|
|
921
|
+
},
|
|
922
|
+
{
|
|
923
|
+
name: "unity_animation_get_blend_tree",
|
|
924
|
+
description: "Get the structure and configuration of a blend tree including all child motions, thresholds, positions, and time scales.",
|
|
925
|
+
inputSchema: {
|
|
926
|
+
type: "object",
|
|
927
|
+
properties: {
|
|
928
|
+
controllerPath: { type: "string", description: "Asset path of the Animator Controller" },
|
|
929
|
+
layerIndex: { type: "number", description: "Layer index (default 0)" },
|
|
930
|
+
stateName: { type: "string", description: "Name of the blend tree state" },
|
|
931
|
+
},
|
|
932
|
+
required: ["controllerPath", "stateName"],
|
|
933
|
+
},
|
|
934
|
+
handler: async (params) => JSON.stringify(await bridge.getBlendTreeInfo(params), null, 2),
|
|
935
|
+
},
|
|
936
|
+
|
|
937
|
+
// ─── Prefab (Advanced) ───
|
|
938
|
+
{
|
|
939
|
+
name: "unity_prefab_info",
|
|
940
|
+
description: "Get detailed prefab information: overrides, variant status, added/removed components. Works on both prefab assets and scene instances.",
|
|
941
|
+
inputSchema: {
|
|
942
|
+
type: "object",
|
|
943
|
+
properties: {
|
|
944
|
+
assetPath: { type: "string", description: "Asset path of the prefab (e.g. 'Assets/Prefabs/Player.prefab')" },
|
|
945
|
+
path: { type: "string", description: "Hierarchy path of a prefab instance in the scene" },
|
|
946
|
+
instanceId: { type: "string", description: "Instance ID of a prefab instance" },
|
|
947
|
+
},
|
|
948
|
+
},
|
|
949
|
+
handler: async (params) => JSON.stringify(await bridge.getPrefabInfo(params), null, 2),
|
|
950
|
+
},
|
|
951
|
+
{
|
|
952
|
+
name: "unity_prefab_create_variant",
|
|
953
|
+
description: "Create a prefab variant from an existing base prefab. Variants inherit from the base and can override specific properties.",
|
|
954
|
+
inputSchema: {
|
|
955
|
+
type: "object",
|
|
956
|
+
properties: {
|
|
957
|
+
basePrefabPath: { type: "string", description: "Asset path of the base prefab" },
|
|
958
|
+
variantPath: { type: "string", description: "Asset path for the new variant" },
|
|
959
|
+
},
|
|
960
|
+
required: ["basePrefabPath", "variantPath"],
|
|
961
|
+
},
|
|
962
|
+
handler: async (params) => JSON.stringify(await bridge.createPrefabVariant(params), null, 2),
|
|
963
|
+
},
|
|
964
|
+
{
|
|
965
|
+
name: "unity_prefab_apply_overrides",
|
|
966
|
+
description: "Apply all overrides from a prefab instance in the scene back to the source prefab asset.",
|
|
967
|
+
inputSchema: {
|
|
968
|
+
type: "object",
|
|
969
|
+
properties: {
|
|
970
|
+
path: { type: "string", description: "Hierarchy path of the prefab instance" },
|
|
971
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
972
|
+
},
|
|
973
|
+
},
|
|
974
|
+
handler: async (params) => JSON.stringify(await bridge.applyPrefabOverrides(params), null, 2),
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: "unity_prefab_revert_overrides",
|
|
978
|
+
description: "Revert all overrides on a prefab instance, restoring it to match the source prefab.",
|
|
979
|
+
inputSchema: {
|
|
980
|
+
type: "object",
|
|
981
|
+
properties: {
|
|
982
|
+
path: { type: "string", description: "Hierarchy path of the prefab instance" },
|
|
983
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
984
|
+
},
|
|
985
|
+
},
|
|
986
|
+
handler: async (params) => JSON.stringify(await bridge.revertPrefabOverrides(params), null, 2),
|
|
987
|
+
},
|
|
988
|
+
{
|
|
989
|
+
name: "unity_prefab_unpack",
|
|
990
|
+
description: "Unpack a prefab instance, converting it to regular GameObjects.",
|
|
991
|
+
inputSchema: {
|
|
992
|
+
type: "object",
|
|
993
|
+
properties: {
|
|
994
|
+
path: { type: "string", description: "Hierarchy path of the prefab instance" },
|
|
995
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
996
|
+
completely: { type: "boolean", description: "If true, unpack completely including nested prefabs (default: false)" },
|
|
997
|
+
},
|
|
998
|
+
},
|
|
999
|
+
handler: async (params) => JSON.stringify(await bridge.unpackPrefab(params), null, 2),
|
|
1000
|
+
},
|
|
1001
|
+
{
|
|
1002
|
+
name: "unity_set_object_reference",
|
|
1003
|
+
description: "[LEGACY — prefer unity_component_set_reference] Set an object reference property on a component via the prefab system. Use unity_component_set_reference instead for richer resolution options.",
|
|
1004
|
+
inputSchema: {
|
|
1005
|
+
type: "object",
|
|
1006
|
+
properties: {
|
|
1007
|
+
path: { type: "string", description: "Hierarchy path of the target GameObject" },
|
|
1008
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
1009
|
+
componentType: { type: "string", description: "Component type name (optional - will search all components)" },
|
|
1010
|
+
propertyName: { type: "string", description: "Name of the ObjectReference property to set" },
|
|
1011
|
+
referencePath: { type: "string", description: "Asset path of the reference (for assets like prefabs, materials, textures)" },
|
|
1012
|
+
referenceGameObject: { type: "string", description: "Name/path of a GameObject in the scene (for scene references)" },
|
|
1013
|
+
},
|
|
1014
|
+
required: ["propertyName"],
|
|
1015
|
+
},
|
|
1016
|
+
handler: async (params) => JSON.stringify(await bridge.setObjectReference(params), null, 2),
|
|
1017
|
+
},
|
|
1018
|
+
{
|
|
1019
|
+
name: "unity_gameobject_duplicate",
|
|
1020
|
+
description: "Duplicate a GameObject with all its children and components.",
|
|
1021
|
+
inputSchema: {
|
|
1022
|
+
type: "object",
|
|
1023
|
+
properties: {
|
|
1024
|
+
path: { type: "string", description: "Hierarchy path or name of the GameObject to duplicate" },
|
|
1025
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
1026
|
+
newName: { type: "string", description: "Name for the duplicate (default: original name + ' (Copy)')" },
|
|
1027
|
+
},
|
|
1028
|
+
},
|
|
1029
|
+
handler: async (params) => JSON.stringify(await bridge.duplicateGameObject(params), null, 2),
|
|
1030
|
+
},
|
|
1031
|
+
{
|
|
1032
|
+
name: "unity_gameobject_set_active",
|
|
1033
|
+
description: "Set a GameObject active or inactive.",
|
|
1034
|
+
inputSchema: {
|
|
1035
|
+
type: "object",
|
|
1036
|
+
properties: {
|
|
1037
|
+
path: { type: "string", description: "Hierarchy path or name of the GameObject" },
|
|
1038
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
1039
|
+
active: { type: "boolean", description: "Whether the GameObject should be active" },
|
|
1040
|
+
},
|
|
1041
|
+
required: ["active"],
|
|
1042
|
+
},
|
|
1043
|
+
handler: async (params) => JSON.stringify(await bridge.setGameObjectActive(params), null, 2),
|
|
1044
|
+
},
|
|
1045
|
+
{
|
|
1046
|
+
name: "unity_gameobject_reparent",
|
|
1047
|
+
description: "Move a GameObject under a new parent in the hierarchy.",
|
|
1048
|
+
inputSchema: {
|
|
1049
|
+
type: "object",
|
|
1050
|
+
properties: {
|
|
1051
|
+
path: { type: "string", description: "Hierarchy path or name of the GameObject to move" },
|
|
1052
|
+
instanceId: { type: "string", description: "Instance ID (alternative to path)" },
|
|
1053
|
+
newParent: { type: "string", description: "Path of the new parent (empty string for scene root)" },
|
|
1054
|
+
worldPositionStays: { type: "boolean", description: "Maintain world position after reparenting (default: true)" },
|
|
1055
|
+
},
|
|
1056
|
+
},
|
|
1057
|
+
handler: async (params) => JSON.stringify(await bridge.reparentGameObject(params), null, 2),
|
|
1058
|
+
},
|
|
1059
|
+
|
|
1060
|
+
// ─── Prefab Asset (Direct Editing) ───
|
|
1061
|
+
{
|
|
1062
|
+
name: "unity_prefab_get_hierarchy",
|
|
1063
|
+
description: "Get the full hierarchy tree of a prefab asset directly from disk — no scene instance needed. Shows all GameObjects, components, and nested children inside the prefab.",
|
|
1064
|
+
inputSchema: {
|
|
1065
|
+
type: "object",
|
|
1066
|
+
properties: {
|
|
1067
|
+
assetPath: { type: "string", description: "Asset path of the prefab (e.g. 'Assets/Prefabs/Player.prefab')" },
|
|
1068
|
+
maxDepth: { type: "number", description: "Maximum hierarchy depth to traverse (default: 10)" },
|
|
1069
|
+
},
|
|
1070
|
+
required: ["assetPath"],
|
|
1071
|
+
},
|
|
1072
|
+
handler: async (params) => JSON.stringify(await bridge.getPrefabAssetHierarchy(params), null, 2),
|
|
1073
|
+
},
|
|
1074
|
+
{
|
|
1075
|
+
name: "unity_prefab_get_properties",
|
|
1076
|
+
description: "Read all serialized properties of a component on a GameObject inside a prefab asset — no scene instance needed. Use prefabPath to target nested children (e.g. 'Body/Head').",
|
|
1077
|
+
inputSchema: {
|
|
1078
|
+
type: "object",
|
|
1079
|
+
properties: {
|
|
1080
|
+
assetPath: { type: "string", description: "Asset path of the prefab (e.g. 'Assets/Prefabs/Player.prefab')" },
|
|
1081
|
+
prefabPath: { type: "string", description: "Path within the prefab hierarchy to the target GameObject (e.g. 'Body/Head'). Empty or omitted = prefab root." },
|
|
1082
|
+
componentType: { type: "string", description: "Component type name (e.g. 'MeshRenderer', 'PlayerController')" },
|
|
1083
|
+
},
|
|
1084
|
+
required: ["assetPath", "componentType"],
|
|
1085
|
+
},
|
|
1086
|
+
handler: async (params) => JSON.stringify(await bridge.getPrefabAssetProperties(params), null, 2),
|
|
1087
|
+
},
|
|
1088
|
+
{
|
|
1089
|
+
name: "unity_prefab_set_property",
|
|
1090
|
+
description: "Set a serialized property value on a component inside a prefab asset — no scene instance needed. Supports floats, ints, strings, bools, vectors, colors, enums.",
|
|
1091
|
+
inputSchema: {
|
|
1092
|
+
type: "object",
|
|
1093
|
+
properties: {
|
|
1094
|
+
assetPath: { type: "string", description: "Asset path of the prefab (e.g. 'Assets/Prefabs/Player.prefab')" },
|
|
1095
|
+
prefabPath: { type: "string", description: "Path within the prefab hierarchy (e.g. 'Body/Head'). Empty = root." },
|
|
1096
|
+
componentType: { type: "string", description: "Component type name" },
|
|
1097
|
+
propertyName: { type: "string", description: "Name of the property to set" },
|
|
1098
|
+
value: { description: "Value to set (type depends on property)" },
|
|
1099
|
+
},
|
|
1100
|
+
required: ["assetPath", "componentType", "propertyName"],
|
|
1101
|
+
},
|
|
1102
|
+
handler: async (params) => JSON.stringify(await bridge.setPrefabAssetProperty(params), null, 2),
|
|
1103
|
+
},
|
|
1104
|
+
{
|
|
1105
|
+
name: "unity_prefab_add_component",
|
|
1106
|
+
description: "Add a component to a GameObject inside a prefab asset — no scene instance needed. Supports built-in types (Rigidbody, BoxCollider, etc.) and custom scripts.",
|
|
1107
|
+
inputSchema: {
|
|
1108
|
+
type: "object",
|
|
1109
|
+
properties: {
|
|
1110
|
+
assetPath: { type: "string", description: "Asset path of the prefab" },
|
|
1111
|
+
prefabPath: { type: "string", description: "Path within the prefab hierarchy. Empty = root." },
|
|
1112
|
+
componentType: { type: "string", description: "Full type name (e.g. 'Rigidbody', 'BoxCollider', 'MyNamespace.MyScript')" },
|
|
1113
|
+
},
|
|
1114
|
+
required: ["assetPath", "componentType"],
|
|
1115
|
+
},
|
|
1116
|
+
handler: async (params) => JSON.stringify(await bridge.addPrefabAssetComponent(params), null, 2),
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
name: "unity_prefab_remove_component",
|
|
1120
|
+
description: "Remove a component from a GameObject inside a prefab asset — no scene instance needed.",
|
|
1121
|
+
inputSchema: {
|
|
1122
|
+
type: "object",
|
|
1123
|
+
properties: {
|
|
1124
|
+
assetPath: { type: "string", description: "Asset path of the prefab" },
|
|
1125
|
+
prefabPath: { type: "string", description: "Path within the prefab hierarchy. Empty = root." },
|
|
1126
|
+
componentType: { type: "string", description: "Component type name to remove" },
|
|
1127
|
+
index: { type: "number", description: "Index if multiple components of same type (default: 0)" },
|
|
1128
|
+
},
|
|
1129
|
+
required: ["assetPath", "componentType"],
|
|
1130
|
+
},
|
|
1131
|
+
handler: async (params) => JSON.stringify(await bridge.removePrefabAssetComponent(params), null, 2),
|
|
1132
|
+
},
|
|
1133
|
+
{
|
|
1134
|
+
name: "unity_prefab_set_reference",
|
|
1135
|
+
description: "Wire an ObjectReference property on a component inside a prefab asset — no scene instance needed. Can reference project assets (materials, textures, prefabs, ScriptableObjects) or other GameObjects within the same prefab.",
|
|
1136
|
+
inputSchema: {
|
|
1137
|
+
type: "object",
|
|
1138
|
+
properties: {
|
|
1139
|
+
assetPath: { type: "string", description: "Asset path of the prefab" },
|
|
1140
|
+
prefabPath: { type: "string", description: "Path within the prefab hierarchy. Empty = root." },
|
|
1141
|
+
componentType: { type: "string", description: "Component type (optional — searches all if omitted)" },
|
|
1142
|
+
propertyName: { type: "string", description: "Name of the ObjectReference property to set" },
|
|
1143
|
+
referenceAssetPath: { type: "string", description: "Asset path of the reference target (e.g. 'Assets/Materials/Red.mat')" },
|
|
1144
|
+
referencePrefabPath: { type: "string", description: "Path to another GameObject within the same prefab (e.g. 'Body/Head')" },
|
|
1145
|
+
referenceComponentType: { type: "string", description: "Get a specific component on the referenced prefab GameObject" },
|
|
1146
|
+
clear: { type: "boolean", description: "Set to true to null out the reference" },
|
|
1147
|
+
},
|
|
1148
|
+
required: ["assetPath", "propertyName"],
|
|
1149
|
+
},
|
|
1150
|
+
handler: async (params) => JSON.stringify(await bridge.setPrefabAssetReference(params), null, 2),
|
|
1151
|
+
},
|
|
1152
|
+
{
|
|
1153
|
+
name: "unity_prefab_add_gameobject",
|
|
1154
|
+
description: "Create a new child GameObject inside a prefab asset — no scene instance needed. Optionally create as a primitive (Cube, Sphere, etc.) with position/rotation/scale.",
|
|
1155
|
+
inputSchema: {
|
|
1156
|
+
type: "object",
|
|
1157
|
+
properties: {
|
|
1158
|
+
assetPath: { type: "string", description: "Asset path of the prefab" },
|
|
1159
|
+
prefabPath: { type: "string", description: "Parent path within the prefab hierarchy. Empty = add under root." },
|
|
1160
|
+
name: { type: "string", description: "Name for the new GameObject" },
|
|
1161
|
+
primitiveType: { type: "string", enum: ["Cube", "Sphere", "Capsule", "Cylinder", "Plane", "Quad"], description: "Optional primitive mesh type" },
|
|
1162
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Local position" },
|
|
1163
|
+
rotation: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Local rotation (Euler angles)" },
|
|
1164
|
+
scale: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Local scale" },
|
|
1165
|
+
},
|
|
1166
|
+
required: ["assetPath", "name"],
|
|
1167
|
+
},
|
|
1168
|
+
handler: async (params) => JSON.stringify(await bridge.addPrefabAssetGameObject(params), null, 2),
|
|
1169
|
+
},
|
|
1170
|
+
{
|
|
1171
|
+
name: "unity_prefab_remove_gameobject",
|
|
1172
|
+
description: "Delete a child GameObject from inside a prefab asset — no scene instance needed. Cannot remove the prefab root.",
|
|
1173
|
+
inputSchema: {
|
|
1174
|
+
type: "object",
|
|
1175
|
+
properties: {
|
|
1176
|
+
assetPath: { type: "string", description: "Asset path of the prefab" },
|
|
1177
|
+
prefabPath: { type: "string", description: "Path to the child GameObject to remove (e.g. 'Body/OldPart'). Cannot be empty (can't delete root)." },
|
|
1178
|
+
},
|
|
1179
|
+
required: ["assetPath", "prefabPath"],
|
|
1180
|
+
},
|
|
1181
|
+
handler: async (params) => JSON.stringify(await bridge.removePrefabAssetGameObject(params), null, 2),
|
|
1182
|
+
},
|
|
1183
|
+
|
|
1184
|
+
// ─── Prefab Variant Management ───
|
|
1185
|
+
{
|
|
1186
|
+
name: "unity_prefab_variant_info",
|
|
1187
|
+
description: "Get variant information for a prefab asset: whether it's a variant, its base prefab path, and list all variants derived from a base prefab. Works on both base prefabs and variants.",
|
|
1188
|
+
inputSchema: {
|
|
1189
|
+
type: "object",
|
|
1190
|
+
properties: {
|
|
1191
|
+
assetPath: { type: "string", description: "Asset path of the prefab (base or variant), e.g. 'Assets/Prefabs/Player.prefab'" },
|
|
1192
|
+
},
|
|
1193
|
+
required: ["assetPath"],
|
|
1194
|
+
},
|
|
1195
|
+
handler: async (params) => JSON.stringify(await bridge.getPrefabVariantInfo(params), null, 2),
|
|
1196
|
+
},
|
|
1197
|
+
{
|
|
1198
|
+
name: "unity_prefab_compare_variant",
|
|
1199
|
+
description: "Compare a prefab variant to its base prefab. Returns all overrides: modified properties, added/removed components, and added/removed GameObjects. The variant must be a Prefab Variant asset.",
|
|
1200
|
+
inputSchema: {
|
|
1201
|
+
type: "object",
|
|
1202
|
+
properties: {
|
|
1203
|
+
assetPath: { type: "string", description: "Asset path of the prefab variant to compare, e.g. 'Assets/Prefabs/PlayerVariant.prefab'" },
|
|
1204
|
+
},
|
|
1205
|
+
required: ["assetPath"],
|
|
1206
|
+
},
|
|
1207
|
+
handler: async (params) => JSON.stringify(await bridge.comparePrefabVariantToBase(params), null, 2),
|
|
1208
|
+
},
|
|
1209
|
+
{
|
|
1210
|
+
name: "unity_prefab_apply_variant_override",
|
|
1211
|
+
description: "Apply overrides from a prefab variant back to its base prefab. Can apply all overrides or filter by componentType and/or gameObject path. This pushes the variant's changes into the base so all variants see them.",
|
|
1212
|
+
inputSchema: {
|
|
1213
|
+
type: "object",
|
|
1214
|
+
properties: {
|
|
1215
|
+
assetPath: { type: "string", description: "Asset path of the prefab variant whose overrides to apply" },
|
|
1216
|
+
componentType: { type: "string", description: "Optional: only apply overrides for this component type (e.g. 'MeshRenderer')" },
|
|
1217
|
+
gameObject: { type: "string", description: "Optional: only apply overrides on this GameObject path within the prefab (e.g. 'Body/Head')" },
|
|
1218
|
+
applyAll: { type: "boolean", description: "If true, apply ALL overrides to the base. Default false." },
|
|
1219
|
+
},
|
|
1220
|
+
required: ["assetPath"],
|
|
1221
|
+
},
|
|
1222
|
+
handler: async (params) => JSON.stringify(await bridge.applyPrefabVariantOverride(params), null, 2),
|
|
1223
|
+
},
|
|
1224
|
+
{
|
|
1225
|
+
name: "unity_prefab_revert_variant_override",
|
|
1226
|
+
description: "Revert overrides on a prefab variant so it matches its base prefab again. Can revert all overrides or filter by componentType and/or gameObject path.",
|
|
1227
|
+
inputSchema: {
|
|
1228
|
+
type: "object",
|
|
1229
|
+
properties: {
|
|
1230
|
+
assetPath: { type: "string", description: "Asset path of the prefab variant to revert" },
|
|
1231
|
+
componentType: { type: "string", description: "Optional: only revert overrides for this component type" },
|
|
1232
|
+
gameObject: { type: "string", description: "Optional: only revert overrides on this GameObject path within the prefab" },
|
|
1233
|
+
revertAll: { type: "boolean", description: "If true, revert ALL overrides. Default false." },
|
|
1234
|
+
},
|
|
1235
|
+
required: ["assetPath"],
|
|
1236
|
+
},
|
|
1237
|
+
handler: async (params) => JSON.stringify(await bridge.revertPrefabVariantOverride(params), null, 2),
|
|
1238
|
+
},
|
|
1239
|
+
{
|
|
1240
|
+
name: "unity_prefab_transfer_variant_overrides",
|
|
1241
|
+
description: "Transfer (copy) overrides from one prefab variant to another variant of the same base. Reads the property modifications from the source variant and applies them to the target variant.",
|
|
1242
|
+
inputSchema: {
|
|
1243
|
+
type: "object",
|
|
1244
|
+
properties: {
|
|
1245
|
+
sourceAssetPath: { type: "string", description: "Asset path of the source prefab variant to copy overrides from" },
|
|
1246
|
+
targetAssetPath: { type: "string", description: "Asset path of the target prefab variant to apply overrides to" },
|
|
1247
|
+
},
|
|
1248
|
+
required: ["sourceAssetPath", "targetAssetPath"],
|
|
1249
|
+
},
|
|
1250
|
+
handler: async (params) => JSON.stringify(await bridge.transferPrefabVariantOverrides(params), null, 2),
|
|
1251
|
+
},
|
|
1252
|
+
|
|
1253
|
+
// ─── Physics ───
|
|
1254
|
+
{
|
|
1255
|
+
name: "unity_physics_raycast",
|
|
1256
|
+
description: "Cast a ray in the physics world and return hit information. Supports single or all-hits mode.",
|
|
1257
|
+
inputSchema: {
|
|
1258
|
+
type: "object",
|
|
1259
|
+
properties: {
|
|
1260
|
+
origin: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Ray origin point" },
|
|
1261
|
+
direction: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Ray direction" },
|
|
1262
|
+
maxDistance: { type: "number", description: "Maximum ray distance (default: Infinity)" },
|
|
1263
|
+
layerMask: { type: "number", description: "Layer mask for filtering (default: all layers)" },
|
|
1264
|
+
all: { type: "boolean", description: "If true, return all hits instead of just the first" },
|
|
1265
|
+
},
|
|
1266
|
+
required: ["origin", "direction"],
|
|
1267
|
+
},
|
|
1268
|
+
handler: async (params) => JSON.stringify(await bridge.physicsRaycast(params), null, 2),
|
|
1269
|
+
},
|
|
1270
|
+
{
|
|
1271
|
+
name: "unity_physics_overlap_sphere",
|
|
1272
|
+
description: "Find all colliders within a sphere. Useful for area-of-effect queries.",
|
|
1273
|
+
inputSchema: {
|
|
1274
|
+
type: "object",
|
|
1275
|
+
properties: {
|
|
1276
|
+
center: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Sphere center" },
|
|
1277
|
+
radius: { type: "number", description: "Sphere radius (default: 1)" },
|
|
1278
|
+
layerMask: { type: "number", description: "Layer mask for filtering" },
|
|
1279
|
+
},
|
|
1280
|
+
required: ["center", "radius"],
|
|
1281
|
+
},
|
|
1282
|
+
handler: async (params) => JSON.stringify(await bridge.physicsOverlapSphere(params), null, 2),
|
|
1283
|
+
},
|
|
1284
|
+
{
|
|
1285
|
+
name: "unity_physics_overlap_box",
|
|
1286
|
+
description: "Find all colliders within a box volume.",
|
|
1287
|
+
inputSchema: {
|
|
1288
|
+
type: "object",
|
|
1289
|
+
properties: {
|
|
1290
|
+
center: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Box center" },
|
|
1291
|
+
halfExtents: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Box half extents" },
|
|
1292
|
+
layerMask: { type: "number", description: "Layer mask for filtering" },
|
|
1293
|
+
},
|
|
1294
|
+
required: ["center", "halfExtents"],
|
|
1295
|
+
},
|
|
1296
|
+
handler: async (params) => JSON.stringify(await bridge.physicsOverlapBox(params), null, 2),
|
|
1297
|
+
},
|
|
1298
|
+
{
|
|
1299
|
+
name: "unity_physics_collision_matrix",
|
|
1300
|
+
description: "Get the physics collision matrix showing which layers collide with each other.",
|
|
1301
|
+
inputSchema: { type: "object", properties: {} },
|
|
1302
|
+
handler: async (params) => JSON.stringify(await bridge.getCollisionMatrix(params), null, 2),
|
|
1303
|
+
},
|
|
1304
|
+
{
|
|
1305
|
+
name: "unity_physics_set_collision_layer",
|
|
1306
|
+
description: "Set whether two physics layers should collide or ignore each other.",
|
|
1307
|
+
inputSchema: {
|
|
1308
|
+
type: "object",
|
|
1309
|
+
properties: {
|
|
1310
|
+
layer1: { type: "number", description: "First layer index" },
|
|
1311
|
+
layer2: { type: "number", description: "Second layer index" },
|
|
1312
|
+
layer1Name: { type: "string", description: "First layer name (alternative to index)" },
|
|
1313
|
+
layer2Name: { type: "string", description: "Second layer name (alternative to index)" },
|
|
1314
|
+
ignore: { type: "boolean", description: "If true, layers will ignore each other (default: true)" },
|
|
1315
|
+
},
|
|
1316
|
+
},
|
|
1317
|
+
handler: async (params) => JSON.stringify(await bridge.setCollisionLayer(params), null, 2),
|
|
1318
|
+
},
|
|
1319
|
+
{
|
|
1320
|
+
name: "unity_physics_set_gravity",
|
|
1321
|
+
description: "Get or set the global physics gravity vector.",
|
|
1322
|
+
inputSchema: {
|
|
1323
|
+
type: "object",
|
|
1324
|
+
properties: {
|
|
1325
|
+
gravity: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "New gravity vector (omit to just read current)" },
|
|
1326
|
+
},
|
|
1327
|
+
},
|
|
1328
|
+
handler: async (params) => JSON.stringify(await bridge.setGravity(params), null, 2),
|
|
1329
|
+
},
|
|
1330
|
+
|
|
1331
|
+
// ─── Lighting ───
|
|
1332
|
+
{
|
|
1333
|
+
name: "unity_lighting_info",
|
|
1334
|
+
description: "Get info about all lights in the scene plus environment/fog settings.",
|
|
1335
|
+
inputSchema: { type: "object", properties: {} },
|
|
1336
|
+
handler: async (params) => JSON.stringify(await bridge.getLightingInfo(params), null, 2),
|
|
1337
|
+
},
|
|
1338
|
+
{
|
|
1339
|
+
name: "unity_lighting_create",
|
|
1340
|
+
description: "Create a new light in the scene (Point, Directional, Spot, or Area).",
|
|
1341
|
+
inputSchema: {
|
|
1342
|
+
type: "object",
|
|
1343
|
+
properties: {
|
|
1344
|
+
name: { type: "string", description: "Light name" },
|
|
1345
|
+
lightType: { type: "string", enum: ["Point", "Directional", "Spot", "Area"], description: "Light type" },
|
|
1346
|
+
color: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } }, description: "Light color (0-1)" },
|
|
1347
|
+
intensity: { type: "number", description: "Light intensity" },
|
|
1348
|
+
range: { type: "number", description: "Light range (Point/Spot)" },
|
|
1349
|
+
spotAngle: { type: "number", description: "Spot angle in degrees (Spot only)" },
|
|
1350
|
+
shadows: { type: "string", enum: ["None", "Hard", "Soft"], description: "Shadow type" },
|
|
1351
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
1352
|
+
rotation: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
1353
|
+
},
|
|
1354
|
+
},
|
|
1355
|
+
handler: async (params) => JSON.stringify(await bridge.createLight(params), null, 2),
|
|
1356
|
+
},
|
|
1357
|
+
{
|
|
1358
|
+
name: "unity_lighting_set_environment",
|
|
1359
|
+
description: "Set environment lighting: ambient mode/color, fog, skybox material.",
|
|
1360
|
+
inputSchema: {
|
|
1361
|
+
type: "object",
|
|
1362
|
+
properties: {
|
|
1363
|
+
ambientMode: { type: "string", enum: ["Skybox", "Trilight", "Flat", "Custom"], description: "Ambient lighting mode" },
|
|
1364
|
+
ambientColor: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } }, description: "Ambient light color" },
|
|
1365
|
+
ambientIntensity: { type: "number", description: "Ambient intensity multiplier" },
|
|
1366
|
+
fogEnabled: { type: "boolean", description: "Enable/disable fog" },
|
|
1367
|
+
fogColor: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } }, description: "Fog color" },
|
|
1368
|
+
fogDensity: { type: "number", description: "Fog density (Exponential mode)" },
|
|
1369
|
+
fogMode: { type: "string", enum: ["Linear", "Exponential", "ExponentialSquared"], description: "Fog mode" },
|
|
1370
|
+
skyboxMaterialPath: { type: "string", description: "Asset path to skybox material" },
|
|
1371
|
+
},
|
|
1372
|
+
},
|
|
1373
|
+
handler: async (params) => JSON.stringify(await bridge.setEnvironment(params), null, 2),
|
|
1374
|
+
},
|
|
1375
|
+
{
|
|
1376
|
+
name: "unity_lighting_create_reflection_probe",
|
|
1377
|
+
description: "Create a reflection probe in the scene.",
|
|
1378
|
+
inputSchema: {
|
|
1379
|
+
type: "object",
|
|
1380
|
+
properties: {
|
|
1381
|
+
name: { type: "string", description: "Probe name" },
|
|
1382
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
1383
|
+
size: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Probe bounds size" },
|
|
1384
|
+
resolution: { type: "integer", description: "Cubemap resolution (128, 256, 512, 1024)" },
|
|
1385
|
+
mode: { type: "string", enum: ["Baked", "Realtime", "Custom"], description: "Probe mode" },
|
|
1386
|
+
},
|
|
1387
|
+
},
|
|
1388
|
+
handler: async (params) => JSON.stringify(await bridge.createReflectionProbe(params), null, 2),
|
|
1389
|
+
},
|
|
1390
|
+
{
|
|
1391
|
+
name: "unity_lighting_create_light_probe_group",
|
|
1392
|
+
description: "Create a light probe group in the scene.",
|
|
1393
|
+
inputSchema: {
|
|
1394
|
+
type: "object",
|
|
1395
|
+
properties: {
|
|
1396
|
+
name: { type: "string", description: "Probe group name" },
|
|
1397
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
1398
|
+
},
|
|
1399
|
+
},
|
|
1400
|
+
handler: async (params) => JSON.stringify(await bridge.createLightProbeGroup(params), null, 2),
|
|
1401
|
+
},
|
|
1402
|
+
|
|
1403
|
+
// ─── Audio ───
|
|
1404
|
+
{
|
|
1405
|
+
name: "unity_audio_info",
|
|
1406
|
+
description: "Get info about all AudioSources and AudioListeners in the scene.",
|
|
1407
|
+
inputSchema: { type: "object", properties: {} },
|
|
1408
|
+
handler: async (params) => JSON.stringify(await bridge.getAudioInfo(params), null, 2),
|
|
1409
|
+
},
|
|
1410
|
+
{
|
|
1411
|
+
name: "unity_audio_create_source",
|
|
1412
|
+
description: "Create or configure an AudioSource on a GameObject. Can attach to existing object or create new one.",
|
|
1413
|
+
inputSchema: {
|
|
1414
|
+
type: "object",
|
|
1415
|
+
properties: {
|
|
1416
|
+
name: { type: "string", description: "Name for new GameObject (if not attaching to existing)" },
|
|
1417
|
+
path: { type: "string", description: "Path of existing GameObject to attach AudioSource to" },
|
|
1418
|
+
instanceId: { type: "string", description: "Instance ID of existing GameObject" },
|
|
1419
|
+
clipPath: { type: "string", description: "Asset path to AudioClip (e.g. 'Assets/Audio/music.wav')" },
|
|
1420
|
+
volume: { type: "number", description: "Volume (0-1)" },
|
|
1421
|
+
pitch: { type: "number", description: "Pitch multiplier" },
|
|
1422
|
+
loop: { type: "boolean", description: "Loop playback" },
|
|
1423
|
+
playOnAwake: { type: "boolean", description: "Play when scene starts" },
|
|
1424
|
+
spatialBlend: { type: "number", description: "0=2D, 1=3D" },
|
|
1425
|
+
minDistance: { type: "number", description: "Min distance for 3D sound" },
|
|
1426
|
+
maxDistance: { type: "number", description: "Max distance for 3D sound" },
|
|
1427
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
1428
|
+
},
|
|
1429
|
+
},
|
|
1430
|
+
handler: async (params) => JSON.stringify(await bridge.createAudioSource(params), null, 2),
|
|
1431
|
+
},
|
|
1432
|
+
{
|
|
1433
|
+
name: "unity_audio_set_global",
|
|
1434
|
+
description: "Set global audio settings (master volume, pause).",
|
|
1435
|
+
inputSchema: {
|
|
1436
|
+
type: "object",
|
|
1437
|
+
properties: {
|
|
1438
|
+
volume: { type: "number", description: "Global volume (0-1)" },
|
|
1439
|
+
pause: { type: "boolean", description: "Pause/unpause all audio" },
|
|
1440
|
+
},
|
|
1441
|
+
},
|
|
1442
|
+
handler: async (params) => JSON.stringify(await bridge.setGlobalAudio(params), null, 2),
|
|
1443
|
+
},
|
|
1444
|
+
|
|
1445
|
+
// ─── Tags & Layers ───
|
|
1446
|
+
{
|
|
1447
|
+
name: "unity_taglayer_info",
|
|
1448
|
+
description: "Get all tags, layers, and sorting layers in the project.",
|
|
1449
|
+
inputSchema: { type: "object", properties: {} },
|
|
1450
|
+
handler: async (params) => JSON.stringify(await bridge.getTagsAndLayers(params), null, 2),
|
|
1451
|
+
},
|
|
1452
|
+
{
|
|
1453
|
+
name: "unity_taglayer_add_tag",
|
|
1454
|
+
description: "Add a new tag to the project.",
|
|
1455
|
+
inputSchema: {
|
|
1456
|
+
type: "object",
|
|
1457
|
+
properties: {
|
|
1458
|
+
tag: { type: "string", description: "Tag name to add" },
|
|
1459
|
+
},
|
|
1460
|
+
required: ["tag"],
|
|
1461
|
+
},
|
|
1462
|
+
handler: async (params) => JSON.stringify(await bridge.addTag(params), null, 2),
|
|
1463
|
+
},
|
|
1464
|
+
{
|
|
1465
|
+
name: "unity_taglayer_set_tag",
|
|
1466
|
+
description: "Assign a tag to a GameObject.",
|
|
1467
|
+
inputSchema: {
|
|
1468
|
+
type: "object",
|
|
1469
|
+
properties: {
|
|
1470
|
+
path: { type: "string", description: "GameObject path" },
|
|
1471
|
+
instanceId: { type: "string", description: "GameObject instance ID" },
|
|
1472
|
+
tag: { type: "string", description: "Tag to assign" },
|
|
1473
|
+
},
|
|
1474
|
+
required: ["tag"],
|
|
1475
|
+
},
|
|
1476
|
+
handler: async (params) => JSON.stringify(await bridge.setTag(params), null, 2),
|
|
1477
|
+
},
|
|
1478
|
+
{
|
|
1479
|
+
name: "unity_taglayer_set_layer",
|
|
1480
|
+
description: "Assign a layer to a GameObject, optionally including children.",
|
|
1481
|
+
inputSchema: {
|
|
1482
|
+
type: "object",
|
|
1483
|
+
properties: {
|
|
1484
|
+
path: { type: "string", description: "GameObject path" },
|
|
1485
|
+
instanceId: { type: "string", description: "GameObject instance ID" },
|
|
1486
|
+
layer: { type: "integer", description: "Layer index (0-31)" },
|
|
1487
|
+
layerName: { type: "string", description: "Layer name (alternative to index)" },
|
|
1488
|
+
includeChildren: { type: "boolean", description: "Apply to all children recursively" },
|
|
1489
|
+
},
|
|
1490
|
+
},
|
|
1491
|
+
handler: async (params) => JSON.stringify(await bridge.setLayer(params), null, 2),
|
|
1492
|
+
},
|
|
1493
|
+
{
|
|
1494
|
+
name: "unity_taglayer_set_static",
|
|
1495
|
+
description: "Set a GameObject as static or not, optionally including children.",
|
|
1496
|
+
inputSchema: {
|
|
1497
|
+
type: "object",
|
|
1498
|
+
properties: {
|
|
1499
|
+
path: { type: "string", description: "GameObject path" },
|
|
1500
|
+
instanceId: { type: "string", description: "GameObject instance ID" },
|
|
1501
|
+
isStatic: { type: "boolean", description: "True to mark static" },
|
|
1502
|
+
includeChildren: { type: "boolean", description: "Apply to all children recursively" },
|
|
1503
|
+
},
|
|
1504
|
+
},
|
|
1505
|
+
handler: async (params) => JSON.stringify(await bridge.setStatic(params), null, 2),
|
|
1506
|
+
},
|
|
1507
|
+
|
|
1508
|
+
// ─── Selection & Scene View ───
|
|
1509
|
+
{
|
|
1510
|
+
name: "unity_selection_get",
|
|
1511
|
+
description: "Get the currently selected GameObjects in the Unity Editor.",
|
|
1512
|
+
inputSchema: { type: "object", properties: {} },
|
|
1513
|
+
handler: async (params) => JSON.stringify(await bridge.getSelection(params), null, 2),
|
|
1514
|
+
},
|
|
1515
|
+
{
|
|
1516
|
+
name: "unity_selection_set",
|
|
1517
|
+
description: "Set the editor selection to specific GameObjects.",
|
|
1518
|
+
inputSchema: {
|
|
1519
|
+
type: "object",
|
|
1520
|
+
properties: {
|
|
1521
|
+
path: { type: "string", description: "Single GameObject path to select" },
|
|
1522
|
+
paths: { type: "array", items: { type: "string" }, description: "Multiple GameObject paths to select" },
|
|
1523
|
+
instanceId: { type: "string", description: "Instance ID of GameObject to select" },
|
|
1524
|
+
},
|
|
1525
|
+
},
|
|
1526
|
+
handler: async (params) => JSON.stringify(await bridge.setSelection(params), null, 2),
|
|
1527
|
+
},
|
|
1528
|
+
{
|
|
1529
|
+
name: "unity_selection_focus_scene_view",
|
|
1530
|
+
description: "Control the Scene View camera: frame a GameObject, set pivot/rotation/zoom, toggle orthographic.",
|
|
1531
|
+
inputSchema: {
|
|
1532
|
+
type: "object",
|
|
1533
|
+
properties: {
|
|
1534
|
+
path: { type: "string", description: "GameObject to frame in scene view" },
|
|
1535
|
+
instanceId: { type: "string", description: "Instance ID of GameObject to frame" },
|
|
1536
|
+
position: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Scene view pivot position" },
|
|
1537
|
+
rotation: { type: "object", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } }, description: "Scene view rotation (euler angles)" },
|
|
1538
|
+
size: { type: "number", description: "Scene view zoom (camera distance)" },
|
|
1539
|
+
orthographic: { type: "boolean", description: "Toggle orthographic/perspective" },
|
|
1540
|
+
},
|
|
1541
|
+
},
|
|
1542
|
+
handler: async (params) => JSON.stringify(await bridge.focusSceneView(params), null, 2),
|
|
1543
|
+
},
|
|
1544
|
+
{
|
|
1545
|
+
name: "unity_selection_find_by_type",
|
|
1546
|
+
description: "Find all GameObjects in the scene that have a specific component type (e.g. 'Rigidbody', 'Camera', 'Light', 'AudioSource', or custom scripts).",
|
|
1547
|
+
inputSchema: {
|
|
1548
|
+
type: "object",
|
|
1549
|
+
properties: {
|
|
1550
|
+
typeName: { type: "string", description: "Component type name (e.g. 'Rigidbody', 'Camera', 'MyScript')" },
|
|
1551
|
+
},
|
|
1552
|
+
required: ["typeName"],
|
|
1553
|
+
},
|
|
1554
|
+
handler: async (params) => JSON.stringify(await bridge.findObjectsByType(params), null, 2),
|
|
1555
|
+
},
|
|
1556
|
+
|
|
1557
|
+
// ─── Agent Management ───
|
|
1558
|
+
{
|
|
1559
|
+
// ─── Input Actions ───
|
|
1560
|
+
name: "unity_input_create",
|
|
1561
|
+
description: "Create a new Input Action Asset (.inputactions file) for Unity's Input System. Supports optional initial action maps.",
|
|
1562
|
+
inputSchema: {
|
|
1563
|
+
type: "object",
|
|
1564
|
+
properties: {
|
|
1565
|
+
path: { type: "string", description: "Asset path (e.g. 'Assets/Settings/Controls.inputactions')" },
|
|
1566
|
+
name: { type: "string", description: "Asset name (defaults to filename)" },
|
|
1567
|
+
maps: {
|
|
1568
|
+
type: "array",
|
|
1569
|
+
description: "Optional initial action maps to create",
|
|
1570
|
+
items: {
|
|
1571
|
+
type: "object",
|
|
1572
|
+
properties: {
|
|
1573
|
+
name: { type: "string", description: "Action map name (e.g. 'Gameplay', 'UI')" },
|
|
1574
|
+
},
|
|
1575
|
+
},
|
|
1576
|
+
},
|
|
1577
|
+
},
|
|
1578
|
+
required: ["path"],
|
|
1579
|
+
},
|
|
1580
|
+
handler: async (params) => JSON.stringify(await bridge.createInputActions(params), null, 2),
|
|
1581
|
+
},
|
|
1582
|
+
{
|
|
1583
|
+
name: "unity_input_info",
|
|
1584
|
+
description: "Get detailed info about an Input Action Asset: maps, actions, bindings, and control schemes.",
|
|
1585
|
+
inputSchema: {
|
|
1586
|
+
type: "object",
|
|
1587
|
+
properties: {
|
|
1588
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1589
|
+
},
|
|
1590
|
+
required: ["path"],
|
|
1591
|
+
},
|
|
1592
|
+
handler: async (params) => JSON.stringify(await bridge.getInputActionsInfo(params), null, 2),
|
|
1593
|
+
},
|
|
1594
|
+
{
|
|
1595
|
+
name: "unity_input_add_map",
|
|
1596
|
+
description: "Add a new action map to an Input Action Asset.",
|
|
1597
|
+
inputSchema: {
|
|
1598
|
+
type: "object",
|
|
1599
|
+
properties: {
|
|
1600
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1601
|
+
mapName: { type: "string", description: "Name of the action map to add (e.g. 'Gameplay', 'UI')" },
|
|
1602
|
+
},
|
|
1603
|
+
required: ["path", "mapName"],
|
|
1604
|
+
},
|
|
1605
|
+
handler: async (params) => JSON.stringify(await bridge.addInputActionMap(params), null, 2),
|
|
1606
|
+
},
|
|
1607
|
+
{
|
|
1608
|
+
name: "unity_input_remove_map",
|
|
1609
|
+
description: "Remove an action map from an Input Action Asset.",
|
|
1610
|
+
inputSchema: {
|
|
1611
|
+
type: "object",
|
|
1612
|
+
properties: {
|
|
1613
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1614
|
+
mapName: { type: "string", description: "Name of the action map to remove" },
|
|
1615
|
+
},
|
|
1616
|
+
required: ["path", "mapName"],
|
|
1617
|
+
},
|
|
1618
|
+
handler: async (params) => JSON.stringify(await bridge.removeInputActionMap(params), null, 2),
|
|
1619
|
+
},
|
|
1620
|
+
{
|
|
1621
|
+
name: "unity_input_add_action",
|
|
1622
|
+
description: "Add an action to an action map in an Input Action Asset.",
|
|
1623
|
+
inputSchema: {
|
|
1624
|
+
type: "object",
|
|
1625
|
+
properties: {
|
|
1626
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1627
|
+
mapName: { type: "string", description: "Name of the action map" },
|
|
1628
|
+
actionName: { type: "string", description: "Name of the action (e.g. 'Move', 'Jump', 'Fire')" },
|
|
1629
|
+
actionType: { type: "string", enum: ["Value", "Button", "PassThrough"], description: "Action type (default: Value)" },
|
|
1630
|
+
expectedControlType: { type: "string", description: "Expected control type (e.g. 'Vector2', 'Axis', 'Button')" },
|
|
1631
|
+
},
|
|
1632
|
+
required: ["path", "mapName", "actionName"],
|
|
1633
|
+
},
|
|
1634
|
+
handler: async (params) => JSON.stringify(await bridge.addInputAction(params), null, 2),
|
|
1635
|
+
},
|
|
1636
|
+
{
|
|
1637
|
+
name: "unity_input_remove_action",
|
|
1638
|
+
description: "Remove an action (and its bindings) from an action map.",
|
|
1639
|
+
inputSchema: {
|
|
1640
|
+
type: "object",
|
|
1641
|
+
properties: {
|
|
1642
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1643
|
+
mapName: { type: "string", description: "Name of the action map" },
|
|
1644
|
+
actionName: { type: "string", description: "Name of the action to remove" },
|
|
1645
|
+
},
|
|
1646
|
+
required: ["path", "mapName", "actionName"],
|
|
1647
|
+
},
|
|
1648
|
+
handler: async (params) => JSON.stringify(await bridge.removeInputAction(params), null, 2),
|
|
1649
|
+
},
|
|
1650
|
+
{
|
|
1651
|
+
name: "unity_input_add_binding",
|
|
1652
|
+
description: "Add a simple (non-composite) binding to an action. Use for single-key bindings like '<Keyboard>/space' or '<Gamepad>/buttonSouth'.",
|
|
1653
|
+
inputSchema: {
|
|
1654
|
+
type: "object",
|
|
1655
|
+
properties: {
|
|
1656
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1657
|
+
mapName: { type: "string", description: "Name of the action map" },
|
|
1658
|
+
actionName: { type: "string", description: "Name of the action to bind to" },
|
|
1659
|
+
bindingPath: { type: "string", description: "Input binding path (e.g. '<Keyboard>/space', '<Gamepad>/leftStick')" },
|
|
1660
|
+
},
|
|
1661
|
+
required: ["path", "mapName", "actionName", "bindingPath"],
|
|
1662
|
+
},
|
|
1663
|
+
handler: async (params) => JSON.stringify(await bridge.addInputBinding(params), null, 2),
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
name: "unity_input_add_composite_binding",
|
|
1667
|
+
description: "Add a composite binding (e.g. WASD, arrows) to an action. Composites combine multiple keys into a single value (1DAxis for up/down, 2DVector for WASD).",
|
|
1668
|
+
inputSchema: {
|
|
1669
|
+
type: "object",
|
|
1670
|
+
properties: {
|
|
1671
|
+
path: { type: "string", description: "Asset path of the .inputactions file" },
|
|
1672
|
+
mapName: { type: "string", description: "Name of the action map" },
|
|
1673
|
+
actionName: { type: "string", description: "Name of the action to bind to" },
|
|
1674
|
+
compositeName: { type: "string", description: "Display name for the composite (e.g. 'WASD', 'Arrows')" },
|
|
1675
|
+
compositeType: { type: "string", description: "Composite type path: '1DAxis' for pos/neg axis, '2DVector' for 4-directional (default: '1DAxis')" },
|
|
1676
|
+
parts: {
|
|
1677
|
+
type: "array",
|
|
1678
|
+
description: "Composite parts — each has a 'name' (e.g. 'positive','negative','up','down','left','right') and 'path' (e.g. '<Keyboard>/w')",
|
|
1679
|
+
items: {
|
|
1680
|
+
type: "object",
|
|
1681
|
+
properties: {
|
|
1682
|
+
name: { type: "string", description: "Part name: 'positive'/'negative' for 1DAxis, 'up'/'down'/'left'/'right' for 2DVector" },
|
|
1683
|
+
path: { type: "string", description: "Input binding path for this part (e.g. '<Keyboard>/w')" },
|
|
1684
|
+
},
|
|
1685
|
+
required: ["name", "path"],
|
|
1686
|
+
},
|
|
1687
|
+
},
|
|
1688
|
+
},
|
|
1689
|
+
required: ["path", "mapName", "actionName", "compositeName", "parts"],
|
|
1690
|
+
},
|
|
1691
|
+
handler: async (params) => JSON.stringify(await bridge.addInputCompositeBinding(params), null, 2),
|
|
1692
|
+
},
|
|
1693
|
+
|
|
1694
|
+
// ─── Assembly Definitions ───
|
|
1695
|
+
{
|
|
1696
|
+
name: "unity_asmdef_create",
|
|
1697
|
+
description: "Create a new Assembly Definition (.asmdef) file for code containerisation and compilation optimisation. Assembly definitions split your project code into separate assemblies, reducing recompilation time and enforcing clean dependency boundaries.",
|
|
1698
|
+
inputSchema: {
|
|
1699
|
+
type: "object",
|
|
1700
|
+
properties: {
|
|
1701
|
+
path: { type: "string", description: "Asset path for the .asmdef file (e.g. 'Assets/Scripts/Runtime/MyGame.Runtime.asmdef')" },
|
|
1702
|
+
name: { type: "string", description: "Assembly name (defaults to filename). Convention: 'Company.Product.Layer' (e.g. 'MyGame.Runtime', 'MyGame.Editor')" },
|
|
1703
|
+
rootNamespace: { type: "string", description: "Root namespace for scripts in this assembly (e.g. 'MyGame.Runtime')" },
|
|
1704
|
+
references: {
|
|
1705
|
+
type: "array",
|
|
1706
|
+
description: "Assembly references — names (e.g. 'Unity.TextMeshPro') or GUID refs (e.g. 'GUID:xxx')",
|
|
1707
|
+
items: { type: "string" },
|
|
1708
|
+
},
|
|
1709
|
+
includePlatforms: {
|
|
1710
|
+
type: "array",
|
|
1711
|
+
description: "Only compile for these platforms. Common: 'Editor', 'Android', 'iOS', 'StandaloneWindows64', 'StandaloneOSX', 'StandaloneLinux64', 'WebGL'",
|
|
1712
|
+
items: { type: "string" },
|
|
1713
|
+
},
|
|
1714
|
+
excludePlatforms: {
|
|
1715
|
+
type: "array",
|
|
1716
|
+
description: "Compile for all platforms EXCEPT these",
|
|
1717
|
+
items: { type: "string" },
|
|
1718
|
+
},
|
|
1719
|
+
allowUnsafeCode: { type: "boolean", description: "Allow unsafe C# code blocks (default: false)" },
|
|
1720
|
+
autoReferenced: { type: "boolean", description: "Automatically referenced by predefined assemblies (default: true)" },
|
|
1721
|
+
noEngineReferences: { type: "boolean", description: "Don't reference UnityEngine (for pure C# libraries, default: false)" },
|
|
1722
|
+
overrideReferences: { type: "boolean", description: "Override precompiled references (default: false)" },
|
|
1723
|
+
precompiledReferences: {
|
|
1724
|
+
type: "array",
|
|
1725
|
+
description: "Precompiled DLL references (when overrideReferences is true)",
|
|
1726
|
+
items: { type: "string" },
|
|
1727
|
+
},
|
|
1728
|
+
defineConstraints: {
|
|
1729
|
+
type: "array",
|
|
1730
|
+
description: "Define constraints — assembly only compiles when ALL symbols are defined (e.g. 'UNITY_EDITOR', 'ENABLE_INPUT_SYSTEM')",
|
|
1731
|
+
items: { type: "string" },
|
|
1732
|
+
},
|
|
1733
|
+
},
|
|
1734
|
+
required: ["path"],
|
|
1735
|
+
},
|
|
1736
|
+
handler: async (params) => JSON.stringify(await bridge.createAssemblyDef(params), null, 2),
|
|
1737
|
+
},
|
|
1738
|
+
{
|
|
1739
|
+
name: "unity_asmdef_info",
|
|
1740
|
+
description: "Get detailed info about an Assembly Definition file: name, references, platforms, settings.",
|
|
1741
|
+
inputSchema: {
|
|
1742
|
+
type: "object",
|
|
1743
|
+
properties: {
|
|
1744
|
+
path: { type: "string", description: "Asset path of the .asmdef file" },
|
|
1745
|
+
},
|
|
1746
|
+
required: ["path"],
|
|
1747
|
+
},
|
|
1748
|
+
handler: async (params) => JSON.stringify(await bridge.getAssemblyDefInfo(params), null, 2),
|
|
1749
|
+
},
|
|
1750
|
+
{
|
|
1751
|
+
name: "unity_asmdef_list",
|
|
1752
|
+
description: "List all Assembly Definition files in the project. Returns name, path, reference count, and platform info for each.",
|
|
1753
|
+
inputSchema: {
|
|
1754
|
+
type: "object",
|
|
1755
|
+
properties: {
|
|
1756
|
+
folder: { type: "string", description: "Folder to search in (default: 'Assets')" },
|
|
1757
|
+
includePackages: { type: "boolean", description: "Also list assembly definitions from Packages/ (default: false)" },
|
|
1758
|
+
},
|
|
1759
|
+
},
|
|
1760
|
+
handler: async (params) => JSON.stringify(await bridge.listAssemblyDefs(params), null, 2),
|
|
1761
|
+
},
|
|
1762
|
+
{
|
|
1763
|
+
name: "unity_asmdef_add_references",
|
|
1764
|
+
description: "Add assembly references to an existing .asmdef file. Supports assembly names (e.g. 'Unity.TextMeshPro') which are auto-resolved to GUID format, or direct GUID refs.",
|
|
1765
|
+
inputSchema: {
|
|
1766
|
+
type: "object",
|
|
1767
|
+
properties: {
|
|
1768
|
+
path: { type: "string", description: "Asset path of the .asmdef file to modify" },
|
|
1769
|
+
references: {
|
|
1770
|
+
type: "array",
|
|
1771
|
+
description: "Assembly names or GUID references to add (e.g. ['Unity.TextMeshPro', 'MyGame.Core'])",
|
|
1772
|
+
items: { type: "string" },
|
|
1773
|
+
},
|
|
1774
|
+
},
|
|
1775
|
+
required: ["path", "references"],
|
|
1776
|
+
},
|
|
1777
|
+
handler: async (params) => JSON.stringify(await bridge.addAssemblyDefReferences(params), null, 2),
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: "unity_asmdef_remove_references",
|
|
1781
|
+
description: "Remove assembly references from an existing .asmdef file.",
|
|
1782
|
+
inputSchema: {
|
|
1783
|
+
type: "object",
|
|
1784
|
+
properties: {
|
|
1785
|
+
path: { type: "string", description: "Asset path of the .asmdef file to modify" },
|
|
1786
|
+
references: {
|
|
1787
|
+
type: "array",
|
|
1788
|
+
description: "Assembly names or GUID references to remove",
|
|
1789
|
+
items: { type: "string" },
|
|
1790
|
+
},
|
|
1791
|
+
},
|
|
1792
|
+
required: ["path", "references"],
|
|
1793
|
+
},
|
|
1794
|
+
handler: async (params) => JSON.stringify(await bridge.removeAssemblyDefReferences(params), null, 2),
|
|
1795
|
+
},
|
|
1796
|
+
{
|
|
1797
|
+
name: "unity_asmdef_set_platforms",
|
|
1798
|
+
description: "Set the include/exclude platform lists for an assembly definition. Use includePlatforms to restrict to specific platforms (e.g. ['Editor'] for editor-only code) or excludePlatforms to exclude certain platforms.",
|
|
1799
|
+
inputSchema: {
|
|
1800
|
+
type: "object",
|
|
1801
|
+
properties: {
|
|
1802
|
+
path: { type: "string", description: "Asset path of the .asmdef file" },
|
|
1803
|
+
includePlatforms: {
|
|
1804
|
+
type: "array",
|
|
1805
|
+
description: "Only compile for these platforms (e.g. ['Editor']). Clears excludePlatforms if set.",
|
|
1806
|
+
items: { type: "string" },
|
|
1807
|
+
},
|
|
1808
|
+
excludePlatforms: {
|
|
1809
|
+
type: "array",
|
|
1810
|
+
description: "Compile for all platforms except these",
|
|
1811
|
+
items: { type: "string" },
|
|
1812
|
+
},
|
|
1813
|
+
},
|
|
1814
|
+
required: ["path"],
|
|
1815
|
+
},
|
|
1816
|
+
handler: async (params) => JSON.stringify(await bridge.setAssemblyDefPlatforms(params), null, 2),
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
name: "unity_asmdef_update_settings",
|
|
1820
|
+
description: "Update settings on an assembly definition: rootNamespace, allowUnsafeCode, autoReferenced, noEngineReferences, defineConstraints, etc. Only supply the properties you want to change.",
|
|
1821
|
+
inputSchema: {
|
|
1822
|
+
type: "object",
|
|
1823
|
+
properties: {
|
|
1824
|
+
path: { type: "string", description: "Asset path of the .asmdef file" },
|
|
1825
|
+
name: { type: "string", description: "New assembly name" },
|
|
1826
|
+
rootNamespace: { type: "string", description: "New root namespace" },
|
|
1827
|
+
allowUnsafeCode: { type: "boolean", description: "Allow unsafe code" },
|
|
1828
|
+
overrideReferences: { type: "boolean", description: "Override precompiled references" },
|
|
1829
|
+
autoReferenced: { type: "boolean", description: "Auto-referenced by predefined assemblies" },
|
|
1830
|
+
noEngineReferences: { type: "boolean", description: "No UnityEngine references" },
|
|
1831
|
+
defineConstraints: {
|
|
1832
|
+
type: "array",
|
|
1833
|
+
description: "Define constraints (symbols required for compilation)",
|
|
1834
|
+
items: { type: "string" },
|
|
1835
|
+
},
|
|
1836
|
+
precompiledReferences: {
|
|
1837
|
+
type: "array",
|
|
1838
|
+
description: "Precompiled DLL references",
|
|
1839
|
+
items: { type: "string" },
|
|
1840
|
+
},
|
|
1841
|
+
},
|
|
1842
|
+
required: ["path"],
|
|
1843
|
+
},
|
|
1844
|
+
handler: async (params) => JSON.stringify(await bridge.updateAssemblyDefSettings(params), null, 2),
|
|
1845
|
+
},
|
|
1846
|
+
{
|
|
1847
|
+
name: "unity_asmdef_create_ref",
|
|
1848
|
+
description: "Create an Assembly Definition Reference (.asmref) file. This lets you include scripts from a different folder into an existing assembly, useful for extending packages or splitting code across directories while keeping them in the same compilation unit.",
|
|
1849
|
+
inputSchema: {
|
|
1850
|
+
type: "object",
|
|
1851
|
+
properties: {
|
|
1852
|
+
path: { type: "string", description: "Asset path for the .asmref file (e.g. 'Assets/Plugins/Extension/MyGame.Runtime.asmref')" },
|
|
1853
|
+
reference: { type: "string", description: "Name of the target assembly definition to reference (e.g. 'MyGame.Runtime')" },
|
|
1854
|
+
},
|
|
1855
|
+
required: ["path", "reference"],
|
|
1856
|
+
},
|
|
1857
|
+
handler: async (params) => JSON.stringify(await bridge.createAssemblyRef(params), null, 2),
|
|
1858
|
+
},
|
|
1859
|
+
|
|
1860
|
+
// ─── Profiler ───
|
|
1861
|
+
{
|
|
1862
|
+
name: "unity_profiler_enable",
|
|
1863
|
+
description: "Enable or disable the Unity Profiler. Optionally enable deep profiling for detailed call stacks (has significant performance overhead).",
|
|
1864
|
+
inputSchema: {
|
|
1865
|
+
type: "object",
|
|
1866
|
+
properties: {
|
|
1867
|
+
enabled: { type: "boolean", description: "true to start profiling, false to stop" },
|
|
1868
|
+
deepProfile: { type: "boolean", description: "Enable deep profiling for full call stacks (high overhead, default: false)" },
|
|
1869
|
+
},
|
|
1870
|
+
required: ["enabled"],
|
|
1871
|
+
},
|
|
1872
|
+
handler: async (params) => JSON.stringify(await bridge.enableProfiler(params), null, 2),
|
|
1873
|
+
},
|
|
1874
|
+
{
|
|
1875
|
+
name: "unity_profiler_stats",
|
|
1876
|
+
description: "Get current rendering statistics: draw calls, batches, triangles, vertices, set-pass calls, frame time, render time, shadow casters, and more. The profiler does NOT need to be enabled for this — stats come from UnityStats which is always available.",
|
|
1877
|
+
inputSchema: { type: "object", properties: {} },
|
|
1878
|
+
handler: async (params) => JSON.stringify(await bridge.getRenderingStats(params), null, 2),
|
|
1879
|
+
},
|
|
1880
|
+
{
|
|
1881
|
+
name: "unity_profiler_memory",
|
|
1882
|
+
description: "Get detailed memory usage breakdown: total allocated, reserved, Mono heap used/size, graphics driver memory, temp allocator size, and GC info. Values are returned in both bytes and human-readable MB.",
|
|
1883
|
+
inputSchema: { type: "object", properties: {} },
|
|
1884
|
+
handler: async (params) => JSON.stringify(await bridge.getMemoryInfo(params), null, 2),
|
|
1885
|
+
},
|
|
1886
|
+
{
|
|
1887
|
+
name: "unity_profiler_frame_data",
|
|
1888
|
+
description: "Get CPU profiler frame data as a hierarchical timing breakdown. Shows function names, total/self time, call counts, and GC allocations. The profiler must be enabled and have captured at least one frame.",
|
|
1889
|
+
inputSchema: {
|
|
1890
|
+
type: "object",
|
|
1891
|
+
properties: {
|
|
1892
|
+
frameIndex: { type: "number", description: "Frame index to read (-1 for latest, default: -1)" },
|
|
1893
|
+
threadIndex: { type: "number", description: "Thread index (0 = main thread, default: 0)" },
|
|
1894
|
+
maxDepth: { type: "number", description: "Maximum hierarchy depth to traverse (default: 5)" },
|
|
1895
|
+
minTimeMs: { type: "number", description: "Minimum total time in ms to include an item (default: 0.1)" },
|
|
1896
|
+
},
|
|
1897
|
+
},
|
|
1898
|
+
handler: async (params) => JSON.stringify(await bridge.getProfilerFrameData(params), null, 2),
|
|
1899
|
+
},
|
|
1900
|
+
{
|
|
1901
|
+
name: "unity_profiler_analyze",
|
|
1902
|
+
description: "Run a comprehensive performance analysis combining memory, rendering stats, profiler frame data, and scene complexity. Returns optimization suggestions based on configurable thresholds (e.g. too many batches, high triangle count, excessive set-pass calls, GPU memory usage, shadow casters).",
|
|
1903
|
+
inputSchema: { type: "object", properties: {} },
|
|
1904
|
+
handler: async (params) => JSON.stringify(await bridge.analyzePerformance(params), null, 2),
|
|
1905
|
+
},
|
|
1906
|
+
|
|
1907
|
+
// ─── Frame Debugger ───
|
|
1908
|
+
{
|
|
1909
|
+
name: "unity_debugger_enable",
|
|
1910
|
+
description: "Enable or disable the Frame Debugger. When enabled, Unity pauses rendering after a specific draw call so you can inspect the GPU state. Uses reflection to access internal Unity APIs (Unity 6+).",
|
|
1911
|
+
inputSchema: {
|
|
1912
|
+
type: "object",
|
|
1913
|
+
properties: {
|
|
1914
|
+
enabled: { type: "boolean", description: "true to enable, false to disable the Frame Debugger" },
|
|
1915
|
+
},
|
|
1916
|
+
required: ["enabled"],
|
|
1917
|
+
},
|
|
1918
|
+
handler: async (params) => JSON.stringify(await bridge.enableFrameDebugger(params), null, 2),
|
|
1919
|
+
},
|
|
1920
|
+
{
|
|
1921
|
+
name: "unity_debugger_events",
|
|
1922
|
+
description: "List all rendering events (draw calls) captured by the Frame Debugger. The Frame Debugger must be enabled first. Returns event index, type, and name for each draw call.",
|
|
1923
|
+
inputSchema: { type: "object", properties: {} },
|
|
1924
|
+
handler: async (params) => JSON.stringify(await bridge.getFrameDebuggerEvents(params), null, 2),
|
|
1925
|
+
},
|
|
1926
|
+
{
|
|
1927
|
+
name: "unity_debugger_event_details",
|
|
1928
|
+
description: "Get detailed information about a specific Frame Debugger event: shader name, pass, keywords, vertex/index/instance counts, render target, batch break cause, and mesh info. The Frame Debugger must be enabled first.",
|
|
1929
|
+
inputSchema: {
|
|
1930
|
+
type: "object",
|
|
1931
|
+
properties: {
|
|
1932
|
+
eventIndex: { type: "number", description: "The event index to inspect (from unity_debugger_events list)" },
|
|
1933
|
+
},
|
|
1934
|
+
required: ["eventIndex"],
|
|
1935
|
+
},
|
|
1936
|
+
handler: async (params) => JSON.stringify(await bridge.getFrameDebuggerEventDetails(params), null, 2),
|
|
1937
|
+
},
|
|
1938
|
+
|
|
1939
|
+
// ─── Memory Profiler ───
|
|
1940
|
+
{
|
|
1941
|
+
name: "unity_memory_status",
|
|
1942
|
+
description: "Check Memory Profiler status: whether the com.unity.memoryprofiler package is installed, available commands, and a quick memory summary. Always call this first before other memory profiler commands.",
|
|
1943
|
+
inputSchema: { type: "object", properties: {} },
|
|
1944
|
+
handler: async (params) => JSON.stringify(await bridge.getMemoryStatus(params), null, 2),
|
|
1945
|
+
},
|
|
1946
|
+
{
|
|
1947
|
+
name: "unity_memory_breakdown",
|
|
1948
|
+
description: "Get detailed memory breakdown by asset type: textures, meshes, materials, shaders, audio clips, animation clips, fonts, render textures, and scriptable objects. Shows count, total size, and optionally top assets per category. Works without the Memory Profiler package (uses built-in Profiler APIs).",
|
|
1949
|
+
inputSchema: {
|
|
1950
|
+
type: "object",
|
|
1951
|
+
properties: {
|
|
1952
|
+
includeDetails: { type: "boolean", description: "If true, include top assets per category with names, sizes, and asset paths (default: false)" },
|
|
1953
|
+
maxPerCategory: { type: "number", description: "Max assets to list per category when includeDetails=true (default: 5)" },
|
|
1954
|
+
},
|
|
1955
|
+
},
|
|
1956
|
+
handler: async (params) => JSON.stringify(await bridge.getMemoryBreakdown(params), null, 2),
|
|
1957
|
+
},
|
|
1958
|
+
{
|
|
1959
|
+
name: "unity_memory_top_assets",
|
|
1960
|
+
description: "Get the top N memory-consuming assets across all types. Shows asset name, type, size, and asset path. Optionally filter by type (texture, mesh, audio, material, shader, animation, font, rendertexture). Works without the Memory Profiler package.",
|
|
1961
|
+
inputSchema: {
|
|
1962
|
+
type: "object",
|
|
1963
|
+
properties: {
|
|
1964
|
+
count: { type: "number", description: "Number of top assets to return (default: 20)" },
|
|
1965
|
+
type: { type: "string", description: "Filter by asset type: texture, rendertexture, mesh, audio, material, shader, animation, font (default: all)" },
|
|
1966
|
+
},
|
|
1967
|
+
},
|
|
1968
|
+
handler: async (params) => JSON.stringify(await bridge.getTopMemoryConsumers(params), null, 2),
|
|
1969
|
+
},
|
|
1970
|
+
{
|
|
1971
|
+
name: "unity_memory_snapshot",
|
|
1972
|
+
description: "Take a detailed memory snapshot using the Memory Profiler package (com.unity.memoryprofiler). Requires the package to be installed. The snapshot can be inspected in the Memory Profiler window. Returns an error with alternatives if the package is not installed.",
|
|
1973
|
+
inputSchema: {
|
|
1974
|
+
type: "object",
|
|
1975
|
+
properties: {
|
|
1976
|
+
path: { type: "string", description: "Directory to save snapshot in (default: temp cache)" },
|
|
1977
|
+
},
|
|
1978
|
+
},
|
|
1979
|
+
handler: async (params) => JSON.stringify(await bridge.takeMemorySnapshot(params), null, 2),
|
|
1980
|
+
},
|
|
1981
|
+
|
|
1982
|
+
// ─── Shader Graph ───
|
|
1983
|
+
{
|
|
1984
|
+
name: "unity_shadergraph_status",
|
|
1985
|
+
description: "Check which graph packages are installed: Shader Graph (com.unity.shadergraph) and Visual Effect Graph (com.unity.visualeffectgraph). Returns available commands based on installed packages.",
|
|
1986
|
+
inputSchema: { type: "object", properties: {} },
|
|
1987
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderGraphStatus(params), null, 2),
|
|
1988
|
+
},
|
|
1989
|
+
{
|
|
1990
|
+
name: "unity_shader_list",
|
|
1991
|
+
description: "List all shaders in the project (both .shader and .shadergraph files). Works without Shader Graph package. Filter by name, include/exclude built-in shaders.",
|
|
1992
|
+
inputSchema: {
|
|
1993
|
+
type: "object",
|
|
1994
|
+
properties: {
|
|
1995
|
+
filter: { type: "string", description: "Filter shaders by name or path (case-insensitive)" },
|
|
1996
|
+
includeBuiltin: { type: "boolean", description: "Include Unity built-in shaders (default: false)" },
|
|
1997
|
+
maxResults: { type: "number", description: "Maximum results to return (default: 100)" },
|
|
1998
|
+
},
|
|
1999
|
+
},
|
|
2000
|
+
handler: async (params) => JSON.stringify(await bridge.listShaders(params), null, 2),
|
|
2001
|
+
},
|
|
2002
|
+
{
|
|
2003
|
+
name: "unity_shadergraph_list",
|
|
2004
|
+
description: "List all Shader Graph (.shadergraph) assets in the project. Requires Shader Graph package. Shows shader name, path, property count, pass count, and file size.",
|
|
2005
|
+
inputSchema: {
|
|
2006
|
+
type: "object",
|
|
2007
|
+
properties: {
|
|
2008
|
+
filter: { type: "string", description: "Filter by name or path" },
|
|
2009
|
+
maxResults: { type: "number", description: "Maximum results (default: 100)" },
|
|
2010
|
+
},
|
|
2011
|
+
},
|
|
2012
|
+
handler: async (params) => JSON.stringify(await bridge.listShaderGraphs(params), null, 2),
|
|
2013
|
+
},
|
|
2014
|
+
{
|
|
2015
|
+
name: "unity_shadergraph_info",
|
|
2016
|
+
description: "Get detailed info about a specific shader graph: exposed properties (with types, ranges), node count, features used (custom functions, sub-graphs, keywords), file size, pass count.",
|
|
2017
|
+
inputSchema: {
|
|
2018
|
+
type: "object",
|
|
2019
|
+
properties: {
|
|
2020
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2021
|
+
},
|
|
2022
|
+
required: ["path"],
|
|
2023
|
+
},
|
|
2024
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderGraphInfo(params), null, 2),
|
|
2025
|
+
},
|
|
2026
|
+
{
|
|
2027
|
+
name: "unity_shader_get_properties",
|
|
2028
|
+
description: "Get exposed properties of any shader (.shader or .shadergraph). Shows property name, display name, type (Color, Vector, Float, Range, TexEnv), range limits, texture dimension, visibility.",
|
|
2029
|
+
inputSchema: {
|
|
2030
|
+
type: "object",
|
|
2031
|
+
properties: {
|
|
2032
|
+
path: { type: "string", description: "Asset path of the shader" },
|
|
2033
|
+
shaderName: { type: "string", description: "Shader name (e.g. 'Universal Render Pipeline/Lit'). Alternative to path." },
|
|
2034
|
+
},
|
|
2035
|
+
},
|
|
2036
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderProperties(params), null, 2),
|
|
2037
|
+
},
|
|
2038
|
+
{
|
|
2039
|
+
name: "unity_shadergraph_create",
|
|
2040
|
+
description: "Create a new Shader Graph from a template. Templates: urp_lit, urp_unlit, urp_sprite_lit, urp_sprite_unlit, urp_decal, hdrp_lit, hdrp_unlit, blank. Requires Shader Graph package.",
|
|
2041
|
+
inputSchema: {
|
|
2042
|
+
type: "object",
|
|
2043
|
+
properties: {
|
|
2044
|
+
path: { type: "string", description: "Asset path for the new shader graph (e.g. 'Assets/Shaders/MyShader.shadergraph')" },
|
|
2045
|
+
template: { type: "string", description: "Template type: urp_lit, urp_unlit, urp_sprite_lit, urp_sprite_unlit, urp_decal, hdrp_lit, hdrp_unlit, blank (default: urp_lit)" },
|
|
2046
|
+
},
|
|
2047
|
+
required: ["path"],
|
|
2048
|
+
},
|
|
2049
|
+
handler: async (params) => JSON.stringify(await bridge.createShaderGraph(params), null, 2),
|
|
2050
|
+
},
|
|
2051
|
+
{
|
|
2052
|
+
name: "unity_shadergraph_open",
|
|
2053
|
+
description: "Open a shader graph in the Shader Graph editor window for visual editing. Requires Shader Graph package.",
|
|
2054
|
+
inputSchema: {
|
|
2055
|
+
type: "object",
|
|
2056
|
+
properties: {
|
|
2057
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2058
|
+
},
|
|
2059
|
+
required: ["path"],
|
|
2060
|
+
},
|
|
2061
|
+
handler: async (params) => JSON.stringify(await bridge.openShaderGraph(params), null, 2),
|
|
2062
|
+
},
|
|
2063
|
+
{
|
|
2064
|
+
name: "unity_shadergraph_list_subgraphs",
|
|
2065
|
+
description: "List all Sub Graph (.shadersubgraph) assets in the project. Sub Graphs are reusable node groups for Shader Graphs. Requires Shader Graph package.",
|
|
2066
|
+
inputSchema: { type: "object", properties: {} },
|
|
2067
|
+
handler: async (params) => JSON.stringify(await bridge.listSubGraphs(params), null, 2),
|
|
2068
|
+
},
|
|
2069
|
+
{
|
|
2070
|
+
name: "unity_vfx_list",
|
|
2071
|
+
description: "List all Visual Effect Graph assets in the project. Requires Visual Effect Graph package (com.unity.visualeffectgraph).",
|
|
2072
|
+
inputSchema: { type: "object", properties: {} },
|
|
2073
|
+
handler: async (params) => JSON.stringify(await bridge.listVFXGraphs(params), null, 2),
|
|
2074
|
+
},
|
|
2075
|
+
{
|
|
2076
|
+
name: "unity_vfx_open",
|
|
2077
|
+
description: "Open a Visual Effect Graph in the VFX Graph editor window. Requires Visual Effect Graph package.",
|
|
2078
|
+
inputSchema: {
|
|
2079
|
+
type: "object",
|
|
2080
|
+
properties: {
|
|
2081
|
+
path: { type: "string", description: "Asset path of the VFX Graph asset" },
|
|
2082
|
+
},
|
|
2083
|
+
required: ["path"],
|
|
2084
|
+
},
|
|
2085
|
+
handler: async (params) => JSON.stringify(await bridge.openVFXGraph(params), null, 2),
|
|
2086
|
+
},
|
|
2087
|
+
{
|
|
2088
|
+
name: "unity_shadergraph_get_nodes",
|
|
2089
|
+
description: "Get all nodes in a Shader Graph file. Returns node IDs, types, positions, and basic property data by parsing the .shadergraph JSON. Essential for understanding graph structure before editing.",
|
|
2090
|
+
inputSchema: {
|
|
2091
|
+
type: "object",
|
|
2092
|
+
properties: {
|
|
2093
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2094
|
+
},
|
|
2095
|
+
required: ["path"],
|
|
2096
|
+
},
|
|
2097
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderGraphNodes(params), null, 2),
|
|
2098
|
+
},
|
|
2099
|
+
{
|
|
2100
|
+
name: "unity_shadergraph_get_edges",
|
|
2101
|
+
description: "Get all edges (connections) in a Shader Graph. Returns source and target node IDs with slot IDs, showing how nodes are wired together.",
|
|
2102
|
+
inputSchema: {
|
|
2103
|
+
type: "object",
|
|
2104
|
+
properties: {
|
|
2105
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2106
|
+
},
|
|
2107
|
+
required: ["path"],
|
|
2108
|
+
},
|
|
2109
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderGraphEdges(params), null, 2),
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: "unity_shadergraph_add_node",
|
|
2113
|
+
description: "Add a new node to a Shader Graph. Supports common types: Add, Multiply, Subtract, Divide, Lerp, Color, Float, Vector2, Vector3, Vector4, Time, UV, Position, Normal, SampleTexture2D, Fresnel, Saturate, OneMinus, Power, Split, Combine. Also supports any type by full class name.",
|
|
2114
|
+
inputSchema: {
|
|
2115
|
+
type: "object",
|
|
2116
|
+
properties: {
|
|
2117
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2118
|
+
nodeType: { type: "string", description: "Node type name (e.g., 'Add', 'Multiply', 'Color', 'SampleTexture2D') or full class name" },
|
|
2119
|
+
positionX: { type: "number", description: "X position in the graph (default 0)" },
|
|
2120
|
+
positionY: { type: "number", description: "Y position in the graph (default 0)" },
|
|
2121
|
+
},
|
|
2122
|
+
required: ["path", "nodeType"],
|
|
2123
|
+
},
|
|
2124
|
+
handler: async (params) => JSON.stringify(await bridge.addShaderGraphNode(params), null, 2),
|
|
2125
|
+
},
|
|
2126
|
+
{
|
|
2127
|
+
name: "unity_shadergraph_remove_node",
|
|
2128
|
+
description: "Remove a node from a Shader Graph by its ID. Also removes all edges connected to the node.",
|
|
2129
|
+
inputSchema: {
|
|
2130
|
+
type: "object",
|
|
2131
|
+
properties: {
|
|
2132
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2133
|
+
nodeId: { type: "string", description: "The node's objectId (GUID) to remove — get from get_nodes" },
|
|
2134
|
+
},
|
|
2135
|
+
required: ["path", "nodeId"],
|
|
2136
|
+
},
|
|
2137
|
+
handler: async (params) => JSON.stringify(await bridge.removeShaderGraphNode(params), null, 2),
|
|
2138
|
+
},
|
|
2139
|
+
{
|
|
2140
|
+
name: "unity_shadergraph_connect",
|
|
2141
|
+
description: "Connect two nodes in a Shader Graph by creating an edge between an output slot and an input slot.",
|
|
2142
|
+
inputSchema: {
|
|
2143
|
+
type: "object",
|
|
2144
|
+
properties: {
|
|
2145
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2146
|
+
outputNodeId: { type: "string", description: "Source node objectId" },
|
|
2147
|
+
outputSlotId: { type: "number", description: "Output slot ID on the source node" },
|
|
2148
|
+
inputNodeId: { type: "string", description: "Target node objectId" },
|
|
2149
|
+
inputSlotId: { type: "number", description: "Input slot ID on the target node" },
|
|
2150
|
+
},
|
|
2151
|
+
required: ["path", "outputNodeId", "outputSlotId", "inputNodeId", "inputSlotId"],
|
|
2152
|
+
},
|
|
2153
|
+
handler: async (params) => JSON.stringify(await bridge.connectShaderGraphNodes(params), null, 2),
|
|
2154
|
+
},
|
|
2155
|
+
{
|
|
2156
|
+
name: "unity_shadergraph_disconnect",
|
|
2157
|
+
description: "Disconnect two nodes in a Shader Graph by removing the edge between them.",
|
|
2158
|
+
inputSchema: {
|
|
2159
|
+
type: "object",
|
|
2160
|
+
properties: {
|
|
2161
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2162
|
+
outputNodeId: { type: "string", description: "Source node objectId" },
|
|
2163
|
+
outputSlotId: { type: "number", description: "Output slot ID" },
|
|
2164
|
+
inputNodeId: { type: "string", description: "Target node objectId" },
|
|
2165
|
+
inputSlotId: { type: "number", description: "Input slot ID" },
|
|
2166
|
+
},
|
|
2167
|
+
required: ["path", "outputNodeId", "outputSlotId", "inputNodeId", "inputSlotId"],
|
|
2168
|
+
},
|
|
2169
|
+
handler: async (params) => JSON.stringify(await bridge.disconnectShaderGraphNodes(params), null, 2),
|
|
2170
|
+
},
|
|
2171
|
+
{
|
|
2172
|
+
name: "unity_shadergraph_set_node_property",
|
|
2173
|
+
description: "Set a property value on a Shader Graph node. Can modify any serialized property like color values, float inputs, vector components, etc.",
|
|
2174
|
+
inputSchema: {
|
|
2175
|
+
type: "object",
|
|
2176
|
+
properties: {
|
|
2177
|
+
path: { type: "string", description: "Asset path of the .shadergraph file" },
|
|
2178
|
+
nodeId: { type: "string", description: "Target node objectId" },
|
|
2179
|
+
propertyName: { type: "string", description: "Property name in the serialized JSON (e.g., 'm_Value', 'm_DefaultValue')" },
|
|
2180
|
+
value: { description: "New value — string, number, or boolean depending on the property" },
|
|
2181
|
+
},
|
|
2182
|
+
required: ["path", "nodeId", "propertyName", "value"],
|
|
2183
|
+
},
|
|
2184
|
+
handler: async (params) => JSON.stringify(await bridge.setShaderGraphNodeProperty(params), null, 2),
|
|
2185
|
+
},
|
|
2186
|
+
{
|
|
2187
|
+
name: "unity_shadergraph_get_node_types",
|
|
2188
|
+
description: "List all available Shader Graph node types by reflecting over the ShaderGraph assembly. Returns type names, categories, and full class names. Useful for discovering available nodes before adding them.",
|
|
2189
|
+
inputSchema: { type: "object", properties: {} },
|
|
2190
|
+
handler: async (params) => JSON.stringify(await bridge.getShaderGraphNodeTypes(params), null, 2),
|
|
2191
|
+
},
|
|
2192
|
+
|
|
2193
|
+
// ─── Amplify Shader Editor ───
|
|
2194
|
+
{
|
|
2195
|
+
name: "unity_amplify_status",
|
|
2196
|
+
description: "Check if Amplify Shader Editor is installed in the project. Returns available commands, shader count, and function count. Only works when Amplify Shader Editor is imported.",
|
|
2197
|
+
inputSchema: { type: "object", properties: {} },
|
|
2198
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyStatus(params), null, 2),
|
|
2199
|
+
},
|
|
2200
|
+
{
|
|
2201
|
+
name: "unity_amplify_list",
|
|
2202
|
+
description: "List all shaders created with Amplify Shader Editor. Detects Amplify shaders by scanning for ASE serialization markers in .shader files. Only available when Amplify is installed.",
|
|
2203
|
+
inputSchema: {
|
|
2204
|
+
type: "object",
|
|
2205
|
+
properties: {
|
|
2206
|
+
filter: { type: "string", description: "Filter by shader name or path" },
|
|
2207
|
+
maxResults: { type: "number", description: "Maximum results (default: 100)" },
|
|
2208
|
+
},
|
|
2209
|
+
},
|
|
2210
|
+
handler: async (params) => JSON.stringify(await bridge.listAmplifyShaders(params), null, 2),
|
|
2211
|
+
},
|
|
2212
|
+
{
|
|
2213
|
+
name: "unity_amplify_info",
|
|
2214
|
+
description: "Get detailed info about an Amplify shader: properties, render queue, pass count, and Amplify metadata (node count, version, features like custom expressions, functions, texture samples).",
|
|
2215
|
+
inputSchema: {
|
|
2216
|
+
type: "object",
|
|
2217
|
+
properties: {
|
|
2218
|
+
path: { type: "string", description: "Asset path of the .shader file" },
|
|
2219
|
+
},
|
|
2220
|
+
required: ["path"],
|
|
2221
|
+
},
|
|
2222
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyShaderInfo(params), null, 2),
|
|
2223
|
+
},
|
|
2224
|
+
{
|
|
2225
|
+
name: "unity_amplify_open",
|
|
2226
|
+
description: "Open a shader in the Amplify Shader Editor window for visual editing. Only available when Amplify is installed.",
|
|
2227
|
+
inputSchema: {
|
|
2228
|
+
type: "object",
|
|
2229
|
+
properties: {
|
|
2230
|
+
path: { type: "string", description: "Asset path of the .shader file" },
|
|
2231
|
+
},
|
|
2232
|
+
required: ["path"],
|
|
2233
|
+
},
|
|
2234
|
+
handler: async (params) => JSON.stringify(await bridge.openAmplifyShader(params), null, 2),
|
|
2235
|
+
},
|
|
2236
|
+
{
|
|
2237
|
+
name: "unity_amplify_list_functions",
|
|
2238
|
+
description: "List all Amplify Shader Functions in the project. Functions are reusable node groups (similar to Shader Graph Sub Graphs). Only available when Amplify is installed.",
|
|
2239
|
+
inputSchema: { type: "object", properties: {} },
|
|
2240
|
+
handler: async (params) => JSON.stringify(await bridge.listAmplifyFunctions(params), null, 2),
|
|
2241
|
+
},
|
|
2242
|
+
{
|
|
2243
|
+
name: "unity_amplify_get_node_types",
|
|
2244
|
+
description: "List all available Amplify Shader Editor node types by reflecting over the ASE assembly. Returns type names, categories, and descriptions. Requires Amplify to be installed.",
|
|
2245
|
+
inputSchema: { type: "object", properties: {} },
|
|
2246
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyNodeTypes(params), null, 2),
|
|
2247
|
+
},
|
|
2248
|
+
{
|
|
2249
|
+
name: "unity_amplify_get_nodes",
|
|
2250
|
+
description: "Get all nodes in the currently open Amplify Shader Editor graph. Returns node IDs, types, positions, and port counts. The ASE window must be open with a shader loaded.",
|
|
2251
|
+
inputSchema: { type: "object", properties: {} },
|
|
2252
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyGraphNodes(params), null, 2),
|
|
2253
|
+
},
|
|
2254
|
+
{
|
|
2255
|
+
name: "unity_amplify_get_connections",
|
|
2256
|
+
description: "Get all connections between nodes in the currently open Amplify Shader Editor graph. Shows which output ports connect to which input ports.",
|
|
2257
|
+
inputSchema: { type: "object", properties: {} },
|
|
2258
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyGraphConnections(params), null, 2),
|
|
2259
|
+
},
|
|
2260
|
+
{
|
|
2261
|
+
name: "unity_amplify_create_shader",
|
|
2262
|
+
description: "Create a new Amplify Shader Editor shader file with proper ASE serialization markers. The shader can then be opened in ASE for visual editing.",
|
|
2263
|
+
inputSchema: {
|
|
2264
|
+
type: "object",
|
|
2265
|
+
properties: {
|
|
2266
|
+
path: { type: "string", description: "Asset path for the new shader (e.g., 'Assets/Shaders/MyShader.shader')" },
|
|
2267
|
+
shaderName: { type: "string", description: "Shader name in the shader dropdown (e.g., 'Custom/MyShader')" },
|
|
2268
|
+
},
|
|
2269
|
+
required: ["path", "shaderName"],
|
|
2270
|
+
},
|
|
2271
|
+
handler: async (params) => JSON.stringify(await bridge.createAmplifyShader(params), null, 2),
|
|
2272
|
+
},
|
|
2273
|
+
{
|
|
2274
|
+
name: "unity_amplify_add_node",
|
|
2275
|
+
description: "Add a node to the currently open Amplify Shader Editor graph. The ASE window must be open with a shader loaded. Use unity_amplify_get_node_types to discover available node types first.",
|
|
2276
|
+
inputSchema: {
|
|
2277
|
+
type: "object",
|
|
2278
|
+
properties: {
|
|
2279
|
+
nodeType: { type: "string", description: "Full type name of the node (e.g., 'AmplifyShaderEditor.ColorNode', 'AmplifyShaderEditor.SimpleMultiplyOpNode', 'AmplifyShaderEditor.SamplerNode')" },
|
|
2280
|
+
x: { type: "number", description: "X position in graph (default: 0)" },
|
|
2281
|
+
y: { type: "number", description: "Y position in graph (default: 0)" },
|
|
2282
|
+
},
|
|
2283
|
+
required: ["nodeType"],
|
|
2284
|
+
},
|
|
2285
|
+
handler: async (params) => JSON.stringify(await bridge.addAmplifyNode(params), null, 2),
|
|
2286
|
+
},
|
|
2287
|
+
{
|
|
2288
|
+
name: "unity_amplify_remove_node",
|
|
2289
|
+
description: "Remove a node from the currently open Amplify Shader Editor graph by its unique ID. Cannot remove the master/output node.",
|
|
2290
|
+
inputSchema: {
|
|
2291
|
+
type: "object",
|
|
2292
|
+
properties: {
|
|
2293
|
+
nodeId: { type: "number", description: "Unique ID of the node to remove (from unity_amplify_get_nodes)" },
|
|
2294
|
+
},
|
|
2295
|
+
required: ["nodeId"],
|
|
2296
|
+
},
|
|
2297
|
+
handler: async (params) => JSON.stringify(await bridge.removeAmplifyNode(params), null, 2),
|
|
2298
|
+
},
|
|
2299
|
+
{
|
|
2300
|
+
name: "unity_amplify_connect",
|
|
2301
|
+
description: "Connect two nodes in the Amplify Shader Editor graph. Connects an output port of one node to an input port of another node.",
|
|
2302
|
+
inputSchema: {
|
|
2303
|
+
type: "object",
|
|
2304
|
+
properties: {
|
|
2305
|
+
outputNodeId: { type: "number", description: "ID of the source node (output side)" },
|
|
2306
|
+
outputPortId: { type: "number", description: "Port index on the output node (0-based)" },
|
|
2307
|
+
inputNodeId: { type: "number", description: "ID of the destination node (input side)" },
|
|
2308
|
+
inputPortId: { type: "number", description: "Port index on the input node (0-based)" },
|
|
2309
|
+
},
|
|
2310
|
+
required: ["outputNodeId", "outputPortId", "inputNodeId", "inputPortId"],
|
|
2311
|
+
},
|
|
2312
|
+
handler: async (params) => JSON.stringify(await bridge.connectAmplifyNodes(params), null, 2),
|
|
2313
|
+
},
|
|
2314
|
+
{
|
|
2315
|
+
name: "unity_amplify_disconnect",
|
|
2316
|
+
description: "Disconnect a specific port on a node in the Amplify Shader Editor graph.",
|
|
2317
|
+
inputSchema: {
|
|
2318
|
+
type: "object",
|
|
2319
|
+
properties: {
|
|
2320
|
+
nodeId: { type: "number", description: "ID of the node" },
|
|
2321
|
+
portId: { type: "number", description: "Port index (0-based)" },
|
|
2322
|
+
isInput: { type: "boolean", description: "True to disconnect an input port, false for output port (default: true)" },
|
|
2323
|
+
},
|
|
2324
|
+
required: ["nodeId", "portId"],
|
|
2325
|
+
},
|
|
2326
|
+
handler: async (params) => JSON.stringify(await bridge.disconnectAmplifyNodes(params), null, 2),
|
|
2327
|
+
},
|
|
2328
|
+
{
|
|
2329
|
+
name: "unity_amplify_node_info",
|
|
2330
|
+
description: "Get detailed information about a specific node in the Amplify Shader Editor graph, including all input/output ports with names, data types, and connection status.",
|
|
2331
|
+
inputSchema: {
|
|
2332
|
+
type: "object",
|
|
2333
|
+
properties: {
|
|
2334
|
+
nodeId: { type: "number", description: "Unique ID of the node" },
|
|
2335
|
+
},
|
|
2336
|
+
required: ["nodeId"],
|
|
2337
|
+
},
|
|
2338
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyNodeInfo(params), null, 2),
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
name: "unity_amplify_set_node_property",
|
|
2342
|
+
description: "Set a property or field value on a node in the Amplify Shader Editor graph via reflection. If the property name is wrong, returns a list of available properties.",
|
|
2343
|
+
inputSchema: {
|
|
2344
|
+
type: "object",
|
|
2345
|
+
properties: {
|
|
2346
|
+
nodeId: { type: "number", description: "Unique ID of the node" },
|
|
2347
|
+
propertyName: { type: "string", description: "Name of the property or field to set (e.g., 'm_defaultValue', 'PropertyName')" },
|
|
2348
|
+
value: { type: "string", description: "Value to set (will be parsed based on property type)" },
|
|
2349
|
+
},
|
|
2350
|
+
required: ["nodeId", "propertyName", "value"],
|
|
2351
|
+
},
|
|
2352
|
+
handler: async (params) => JSON.stringify(await bridge.setAmplifyNodeProperty(params), null, 2),
|
|
2353
|
+
},
|
|
2354
|
+
{
|
|
2355
|
+
name: "unity_amplify_move_node",
|
|
2356
|
+
description: "Move a node to a new position in the Amplify Shader Editor graph.",
|
|
2357
|
+
inputSchema: {
|
|
2358
|
+
type: "object",
|
|
2359
|
+
properties: {
|
|
2360
|
+
nodeId: { type: "number", description: "Unique ID of the node" },
|
|
2361
|
+
x: { type: "number", description: "New X position" },
|
|
2362
|
+
y: { type: "number", description: "New Y position" },
|
|
2363
|
+
},
|
|
2364
|
+
required: ["nodeId", "x", "y"],
|
|
2365
|
+
},
|
|
2366
|
+
handler: async (params) => JSON.stringify(await bridge.moveAmplifyNode(params), null, 2),
|
|
2367
|
+
},
|
|
2368
|
+
{
|
|
2369
|
+
name: "unity_amplify_save",
|
|
2370
|
+
description: "Save the currently open Amplify Shader Editor graph to disk. If the shader has never been saved, auto-determines a save path from the shader name or uses the provided path.",
|
|
2371
|
+
inputSchema: {
|
|
2372
|
+
type: "object",
|
|
2373
|
+
properties: {
|
|
2374
|
+
path: { type: "string", description: "Optional asset path to save to (e.g. 'Assets/Shaders/MyShader.shader'). Only needed if the shader has never been saved before." },
|
|
2375
|
+
},
|
|
2376
|
+
},
|
|
2377
|
+
handler: async (params) => JSON.stringify(await bridge.saveAmplifyGraph(params), null, 2),
|
|
2378
|
+
},
|
|
2379
|
+
{
|
|
2380
|
+
name: "unity_amplify_close",
|
|
2381
|
+
description: "Close the Amplify Shader Editor window. By default saves the graph before closing to prevent save dialogs.",
|
|
2382
|
+
inputSchema: {
|
|
2383
|
+
type: "object",
|
|
2384
|
+
properties: {
|
|
2385
|
+
save: { type: "boolean", description: "Save the graph before closing (default: true)" },
|
|
2386
|
+
},
|
|
2387
|
+
},
|
|
2388
|
+
handler: async (params) => JSON.stringify(await bridge.closeAmplifyEditor(params), null, 2),
|
|
2389
|
+
},
|
|
2390
|
+
{
|
|
2391
|
+
name: "unity_amplify_create_from_template",
|
|
2392
|
+
description: "Create a new Amplify shader from a predefined template (surface, unlit, urp_lit, transparent, post_process). The shader file is created and can then be opened in ASE.",
|
|
2393
|
+
inputSchema: {
|
|
2394
|
+
type: "object",
|
|
2395
|
+
properties: {
|
|
2396
|
+
path: { type: "string", description: "Asset path for the new shader (e.g., 'Assets/Shaders/MyShader.shader')" },
|
|
2397
|
+
shaderName: { type: "string", description: "Shader name in the dropdown (e.g., 'Custom/MyShader')" },
|
|
2398
|
+
template: { type: "string", description: "Template type: 'surface' (Standard PBR), 'unlit', 'urp' or 'urp_lit' (URP Lit), 'transparent', 'post_process' or 'postprocess'" },
|
|
2399
|
+
},
|
|
2400
|
+
required: ["path", "shaderName", "template"],
|
|
2401
|
+
},
|
|
2402
|
+
handler: async (params) => JSON.stringify(await bridge.createAmplifyFromTemplate(params), null, 2),
|
|
2403
|
+
},
|
|
2404
|
+
{
|
|
2405
|
+
name: "unity_amplify_focus_node",
|
|
2406
|
+
description: "Focus the Amplify Shader Editor view on a specific node, centering and optionally zooming to it.",
|
|
2407
|
+
inputSchema: {
|
|
2408
|
+
type: "object",
|
|
2409
|
+
properties: {
|
|
2410
|
+
nodeId: { type: "number", description: "Unique ID of the node to focus on" },
|
|
2411
|
+
zoom: { type: "number", description: "Zoom level (default: 1.0)" },
|
|
2412
|
+
select: { type: "boolean", description: "Also select the node (default: true)" },
|
|
2413
|
+
},
|
|
2414
|
+
required: ["nodeId"],
|
|
2415
|
+
},
|
|
2416
|
+
handler: async (params) => JSON.stringify(await bridge.focusAmplifyNode(params), null, 2),
|
|
2417
|
+
},
|
|
2418
|
+
{
|
|
2419
|
+
name: "unity_amplify_master_node_info",
|
|
2420
|
+
description: "Get detailed information about the master/output node of the currently open Amplify shader graph, including all its input ports and properties.",
|
|
2421
|
+
inputSchema: { type: "object", properties: {} },
|
|
2422
|
+
handler: async (params) => JSON.stringify(await bridge.getAmplifyMasterNodeInfo(params), null, 2),
|
|
2423
|
+
},
|
|
2424
|
+
{
|
|
2425
|
+
name: "unity_amplify_disconnect_all",
|
|
2426
|
+
description: "Remove all connections from a specific node in the Amplify Shader Editor graph (both input and output connections).",
|
|
2427
|
+
inputSchema: {
|
|
2428
|
+
type: "object",
|
|
2429
|
+
properties: {
|
|
2430
|
+
nodeId: { type: "number", description: "Unique ID of the node to disconnect" },
|
|
2431
|
+
},
|
|
2432
|
+
required: ["nodeId"],
|
|
2433
|
+
},
|
|
2434
|
+
handler: async (params) => JSON.stringify(await bridge.disconnectAllAmplifyNode(params), null, 2),
|
|
2435
|
+
},
|
|
2436
|
+
{
|
|
2437
|
+
name: "unity_amplify_duplicate_node",
|
|
2438
|
+
description: "Duplicate a node in the Amplify Shader Editor graph. Creates a new node of the same type at a slight offset from the original.",
|
|
2439
|
+
inputSchema: {
|
|
2440
|
+
type: "object",
|
|
2441
|
+
properties: {
|
|
2442
|
+
nodeId: { type: "number", description: "Unique ID of the node to duplicate" },
|
|
2443
|
+
offsetX: { type: "number", description: "X offset from original (default: 50)" },
|
|
2444
|
+
offsetY: { type: "number", description: "Y offset from original (default: 50)" },
|
|
2445
|
+
},
|
|
2446
|
+
required: ["nodeId"],
|
|
2447
|
+
},
|
|
2448
|
+
handler: async (params) => JSON.stringify(await bridge.duplicateAmplifyNode(params), null, 2),
|
|
2449
|
+
},
|
|
2450
|
+
|
|
2451
|
+
// ─── Search & Find ───
|
|
2452
|
+
{
|
|
2453
|
+
name: "unity_search_by_component",
|
|
2454
|
+
description: "Find all GameObjects in the scene that have a specific component type. Returns their paths and instance IDs.",
|
|
2455
|
+
inputSchema: {
|
|
2456
|
+
type: "object",
|
|
2457
|
+
properties: {
|
|
2458
|
+
componentType: { type: "string", description: "Component type name (e.g. 'Rigidbody', 'Camera', 'AudioSource', 'MyScript')" },
|
|
2459
|
+
includeInactive: { type: "boolean", description: "Include inactive GameObjects (default: false)" },
|
|
2460
|
+
limit: { type: "number", description: "Maximum results to return (default: 500). Use lower values on large scenes." },
|
|
2461
|
+
},
|
|
2462
|
+
required: ["componentType"],
|
|
2463
|
+
},
|
|
2464
|
+
handler: async (params) => JSON.stringify(await bridge.findByComponent(params), null, 2),
|
|
2465
|
+
},
|
|
2466
|
+
{
|
|
2467
|
+
name: "unity_search_by_tag",
|
|
2468
|
+
description: "Find all GameObjects with a specific tag.",
|
|
2469
|
+
inputSchema: {
|
|
2470
|
+
type: "object",
|
|
2471
|
+
properties: {
|
|
2472
|
+
tag: { type: "string", description: "Tag name (e.g. 'Player', 'Enemy', 'MainCamera')" },
|
|
2473
|
+
limit: { type: "number", description: "Maximum results to return (default: 500)." },
|
|
2474
|
+
},
|
|
2475
|
+
required: ["tag"],
|
|
2476
|
+
},
|
|
2477
|
+
handler: async (params) => JSON.stringify(await bridge.findByTag(params), null, 2),
|
|
2478
|
+
},
|
|
2479
|
+
{
|
|
2480
|
+
name: "unity_search_by_layer",
|
|
2481
|
+
description: "Find all GameObjects on a specific layer.",
|
|
2482
|
+
inputSchema: {
|
|
2483
|
+
type: "object",
|
|
2484
|
+
properties: {
|
|
2485
|
+
layer: { type: "string", description: "Layer name or index (e.g. 'UI', 'Water', '5')" },
|
|
2486
|
+
limit: { type: "number", description: "Maximum results to return (default: 500)." },
|
|
2487
|
+
},
|
|
2488
|
+
required: ["layer"],
|
|
2489
|
+
},
|
|
2490
|
+
handler: async (params) => JSON.stringify(await bridge.findByLayer(params), null, 2),
|
|
2491
|
+
},
|
|
2492
|
+
{
|
|
2493
|
+
name: "unity_search_by_name",
|
|
2494
|
+
description: "Find all GameObjects whose name contains a pattern. Supports substring matching or regex.",
|
|
2495
|
+
inputSchema: {
|
|
2496
|
+
type: "object",
|
|
2497
|
+
properties: {
|
|
2498
|
+
name: { type: "string", description: "Name pattern to search for" },
|
|
2499
|
+
regex: { type: "boolean", description: "Use regex matching instead of substring (default: false)" },
|
|
2500
|
+
includeInactive: { type: "boolean", description: "Include inactive GameObjects (default: false)" },
|
|
2501
|
+
limit: { type: "number", description: "Maximum results to return (default: 500)." },
|
|
2502
|
+
},
|
|
2503
|
+
required: ["name"],
|
|
2504
|
+
},
|
|
2505
|
+
handler: async (params) => JSON.stringify(await bridge.findByName(params), null, 2),
|
|
2506
|
+
},
|
|
2507
|
+
{
|
|
2508
|
+
name: "unity_search_by_shader",
|
|
2509
|
+
description: "Find all renderers using a specific shader.",
|
|
2510
|
+
inputSchema: {
|
|
2511
|
+
type: "object",
|
|
2512
|
+
properties: {
|
|
2513
|
+
shader: { type: "string", description: "Shader name to search for (partial match)" },
|
|
2514
|
+
limit: { type: "number", description: "Maximum results to return (default: 500)." },
|
|
2515
|
+
},
|
|
2516
|
+
required: ["shader"],
|
|
2517
|
+
},
|
|
2518
|
+
handler: async (params) => JSON.stringify(await bridge.findByShader(params), null, 2),
|
|
2519
|
+
},
|
|
2520
|
+
{
|
|
2521
|
+
name: "unity_search_assets",
|
|
2522
|
+
description: "Search for assets in the project by name, type, and folder. Uses Unity's AssetDatabase search.",
|
|
2523
|
+
inputSchema: {
|
|
2524
|
+
type: "object",
|
|
2525
|
+
properties: {
|
|
2526
|
+
query: { type: "string", description: "Search query (asset name)" },
|
|
2527
|
+
type: { type: "string", description: "Asset type filter (e.g. 'Material', 'Texture2D', 'Prefab', 'Scene', 'AnimationClip', 'ScriptableObject')" },
|
|
2528
|
+
folder: { type: "string", description: "Folder to search in (e.g. 'Assets/Prefabs')" },
|
|
2529
|
+
maxResults: { type: "number", description: "Maximum results to return (default: 100)" },
|
|
2530
|
+
},
|
|
2531
|
+
},
|
|
2532
|
+
handler: async (params) => JSON.stringify(await bridge.searchAssets(params), null, 2),
|
|
2533
|
+
},
|
|
2534
|
+
{
|
|
2535
|
+
name: "unity_search_missing_references",
|
|
2536
|
+
description: "Find all missing/broken object references and missing scripts in the scene. Essential for cleanup and debugging.",
|
|
2537
|
+
inputSchema: {
|
|
2538
|
+
type: "object",
|
|
2539
|
+
properties: {
|
|
2540
|
+
scope: { type: "string", description: "'scene' (default) or 'assets'" },
|
|
2541
|
+
limit: { type: "number", description: "Maximum results to return (default: 500)." },
|
|
2542
|
+
},
|
|
2543
|
+
},
|
|
2544
|
+
handler: async (params) => JSON.stringify(await bridge.findMissingReferences(params), null, 2),
|
|
2545
|
+
},
|
|
2546
|
+
{
|
|
2547
|
+
name: "unity_scene_stats",
|
|
2548
|
+
description: "Get comprehensive scene statistics: total objects, vertices, triangles, lights, cameras, colliders, and top component types.",
|
|
2549
|
+
inputSchema: { type: "object", properties: {} },
|
|
2550
|
+
handler: async (params) => JSON.stringify(await bridge.getSceneStats(params), null, 2),
|
|
2551
|
+
},
|
|
2552
|
+
|
|
2553
|
+
// ─── Project Settings ───
|
|
2554
|
+
{
|
|
2555
|
+
name: "unity_settings_quality",
|
|
2556
|
+
description: "Get current quality settings: level, shadows, anti-aliasing, LOD bias, vsync, and all quality levels available.",
|
|
2557
|
+
inputSchema: { type: "object", properties: {} },
|
|
2558
|
+
handler: async (params) => JSON.stringify(await bridge.getQualitySettings(params), null, 2),
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
name: "unity_settings_set_quality_level",
|
|
2562
|
+
description: "Set the active quality level by name or index.",
|
|
2563
|
+
inputSchema: {
|
|
2564
|
+
type: "object",
|
|
2565
|
+
properties: {
|
|
2566
|
+
level: { type: "string", description: "Quality level name (e.g. 'Ultra', 'High') or index (e.g. '0', '3')" },
|
|
2567
|
+
},
|
|
2568
|
+
required: ["level"],
|
|
2569
|
+
},
|
|
2570
|
+
handler: async (params) => JSON.stringify(await bridge.setQualityLevel(params), null, 2),
|
|
2571
|
+
},
|
|
2572
|
+
{
|
|
2573
|
+
name: "unity_settings_physics",
|
|
2574
|
+
description: "Get physics settings: gravity, solver iterations, sleep threshold, contact offset, bounce threshold.",
|
|
2575
|
+
inputSchema: { type: "object", properties: {} },
|
|
2576
|
+
handler: async (params) => JSON.stringify(await bridge.getPhysicsSettings(params), null, 2),
|
|
2577
|
+
},
|
|
2578
|
+
{
|
|
2579
|
+
name: "unity_settings_set_physics",
|
|
2580
|
+
description: "Modify physics settings like gravity, solver iterations, sleep threshold, etc.",
|
|
2581
|
+
inputSchema: {
|
|
2582
|
+
type: "object",
|
|
2583
|
+
properties: {
|
|
2584
|
+
gravity: { type: "object", description: "Gravity vector { x, y, z } (default: 0, -9.81, 0)", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
2585
|
+
defaultSolverIterations: { type: "number", description: "Physics solver iterations (default: 6)" },
|
|
2586
|
+
sleepThreshold: { type: "number", description: "Energy threshold for sleep" },
|
|
2587
|
+
bounceThreshold: { type: "number", description: "Velocity threshold for bouncing" },
|
|
2588
|
+
defaultContactOffset: { type: "number", description: "Default contact offset" },
|
|
2589
|
+
queriesHitTriggers: { type: "boolean", description: "Whether raycasts hit trigger colliders" },
|
|
2590
|
+
},
|
|
2591
|
+
},
|
|
2592
|
+
handler: async (params) => JSON.stringify(await bridge.setPhysicsSettings(params), null, 2),
|
|
2593
|
+
},
|
|
2594
|
+
{
|
|
2595
|
+
name: "unity_settings_time",
|
|
2596
|
+
description: "Get time settings: fixedDeltaTime, maximumDeltaTime, timeScale.",
|
|
2597
|
+
inputSchema: { type: "object", properties: {} },
|
|
2598
|
+
handler: async (params) => JSON.stringify(await bridge.getTimeSettings(params), null, 2),
|
|
2599
|
+
},
|
|
2600
|
+
{
|
|
2601
|
+
name: "unity_settings_set_time",
|
|
2602
|
+
description: "Modify time settings: fixed timestep, max delta time, time scale (for slow-mo or fast-forward).",
|
|
2603
|
+
inputSchema: {
|
|
2604
|
+
type: "object",
|
|
2605
|
+
properties: {
|
|
2606
|
+
fixedDeltaTime: { type: "number", description: "Fixed timestep (default: 0.02 = 50Hz)" },
|
|
2607
|
+
maximumDeltaTime: { type: "number", description: "Maximum allowed delta time" },
|
|
2608
|
+
timeScale: { type: "number", description: "Time scale (1 = normal, 0.5 = half speed, 2 = double speed)" },
|
|
2609
|
+
},
|
|
2610
|
+
},
|
|
2611
|
+
handler: async (params) => JSON.stringify(await bridge.setTimeSettings(params), null, 2),
|
|
2612
|
+
},
|
|
2613
|
+
{
|
|
2614
|
+
name: "unity_settings_player",
|
|
2615
|
+
description: "Get player settings: company name, product name, version, color space, scripting backend, target architecture.",
|
|
2616
|
+
inputSchema: { type: "object", properties: {} },
|
|
2617
|
+
handler: async (params) => JSON.stringify(await bridge.getPlayerSettings(params), null, 2),
|
|
2618
|
+
},
|
|
2619
|
+
{
|
|
2620
|
+
name: "unity_settings_set_player",
|
|
2621
|
+
description: "Modify player settings like company name, product name, bundle version, run in background.",
|
|
2622
|
+
inputSchema: {
|
|
2623
|
+
type: "object",
|
|
2624
|
+
properties: {
|
|
2625
|
+
companyName: { type: "string", description: "Company name" },
|
|
2626
|
+
productName: { type: "string", description: "Product/game name" },
|
|
2627
|
+
bundleVersion: { type: "string", description: "Version string (e.g. '1.0.0')" },
|
|
2628
|
+
runInBackground: { type: "boolean", description: "Run in background when unfocused" },
|
|
2629
|
+
},
|
|
2630
|
+
},
|
|
2631
|
+
handler: async (params) => JSON.stringify(await bridge.setPlayerSettings(params), null, 2),
|
|
2632
|
+
},
|
|
2633
|
+
{
|
|
2634
|
+
name: "unity_settings_render_pipeline",
|
|
2635
|
+
description: "Get information about the current render pipeline (Built-in, URP, HDRP).",
|
|
2636
|
+
inputSchema: { type: "object", properties: {} },
|
|
2637
|
+
handler: async (params) => JSON.stringify(await bridge.getRenderPipelineInfo(params), null, 2),
|
|
2638
|
+
},
|
|
2639
|
+
|
|
2640
|
+
// ─── Undo ───
|
|
2641
|
+
{
|
|
2642
|
+
name: "unity_undo",
|
|
2643
|
+
description: "Undo the last operation in Unity Editor.",
|
|
2644
|
+
inputSchema: { type: "object", properties: {} },
|
|
2645
|
+
handler: async (params) => JSON.stringify(await bridge.performUndo(params), null, 2),
|
|
2646
|
+
},
|
|
2647
|
+
{
|
|
2648
|
+
name: "unity_redo",
|
|
2649
|
+
description: "Redo the last undone operation in Unity Editor.",
|
|
2650
|
+
inputSchema: { type: "object", properties: {} },
|
|
2651
|
+
handler: async (params) => JSON.stringify(await bridge.performRedo(params), null, 2),
|
|
2652
|
+
},
|
|
2653
|
+
{
|
|
2654
|
+
name: "unity_undo_history",
|
|
2655
|
+
description: "Get information about the current undo group.",
|
|
2656
|
+
inputSchema: { type: "object", properties: {} },
|
|
2657
|
+
handler: async (params) => JSON.stringify(await bridge.getUndoHistory(params), null, 2),
|
|
2658
|
+
},
|
|
2659
|
+
{
|
|
2660
|
+
name: "unity_undo_clear",
|
|
2661
|
+
description: "Clear undo history. Can clear for a specific object or all undo history.",
|
|
2662
|
+
inputSchema: {
|
|
2663
|
+
type: "object",
|
|
2664
|
+
properties: {
|
|
2665
|
+
objectPath: { type: "string", description: "Optional: clear undo only for this GameObject. If omitted, clears all." },
|
|
2666
|
+
},
|
|
2667
|
+
},
|
|
2668
|
+
handler: async (params) => JSON.stringify(await bridge.clearUndo(params), null, 2),
|
|
2669
|
+
},
|
|
2670
|
+
|
|
2671
|
+
// ─── Screenshot / Scene View ───
|
|
2672
|
+
{
|
|
2673
|
+
name: "unity_screenshot_game",
|
|
2674
|
+
description: "Capture a screenshot of the Game View. The screenshot is saved on the next frame render.",
|
|
2675
|
+
inputSchema: {
|
|
2676
|
+
type: "object",
|
|
2677
|
+
properties: {
|
|
2678
|
+
path: { type: "string", description: "Save path (default: Assets/Screenshots/GameView_timestamp.png)" },
|
|
2679
|
+
superSize: { type: "number", description: "Resolution multiplier (1 = normal, 2 = 2x, 4 = 4x)" },
|
|
2680
|
+
},
|
|
2681
|
+
},
|
|
2682
|
+
handler: async (params) => JSON.stringify(await bridge.captureGameView(params), null, 2),
|
|
2683
|
+
},
|
|
2684
|
+
{
|
|
2685
|
+
name: "unity_screenshot_scene",
|
|
2686
|
+
description: "Capture a screenshot of the Scene View camera. Returns immediately with the saved file path.",
|
|
2687
|
+
inputSchema: {
|
|
2688
|
+
type: "object",
|
|
2689
|
+
properties: {
|
|
2690
|
+
path: { type: "string", description: "Save path (default: Assets/Screenshots/SceneView_timestamp.png)" },
|
|
2691
|
+
width: { type: "number", description: "Image width (default: 1920)" },
|
|
2692
|
+
height: { type: "number", description: "Image height (default: 1080)" },
|
|
2693
|
+
},
|
|
2694
|
+
},
|
|
2695
|
+
handler: async (params) => JSON.stringify(await bridge.captureSceneView(params), null, 2),
|
|
2696
|
+
},
|
|
2697
|
+
{
|
|
2698
|
+
name: "unity_screenshot_editor_window",
|
|
2699
|
+
description:
|
|
2700
|
+
"Capture a screenshot of a specific Editor window (Inspector, Project, Console, custom editor windows) to a PNG file, via the Win32 PrintWindow API — occlusion-proof (grabs the real editor UI even when the window is hidden behind others, without raising it or stealing focus). " +
|
|
2701
|
+
"USE ONLY ON EXPLICIT USER REQUEST: call this tool ONLY when the user specifically asks to take a screenshot / screen capture of an editor window. Do NOT call it proactively, to visually inspect the editor for your own reasoning, or as an implicit step toward another task — if you merely think a capture might help, do not call it unless the user asked. " +
|
|
2702
|
+
"WINDOWS EDITOR ONLY: it relies on a Win32 API with no macOS/Linux equivalent. On macOS/Linux it returns { success:false, error, platform }; when that happens (or if you already know the user is not on the Windows editor), do NOT retry — tell the user this feature is unavailable on their operating system. " +
|
|
2703
|
+
"For the game or scene view use unity_screenshot_game / unity_screenshot_scene instead (camera-based, cross-platform).",
|
|
2704
|
+
inputSchema: {
|
|
2705
|
+
type: "object",
|
|
2706
|
+
properties: {
|
|
2707
|
+
window: { type: "string", description: "Target window: EditorWindow type FullName (e.g. 'UnityEditor.InspectorWindow'), simple type name, or visible tab title." },
|
|
2708
|
+
path: { type: "string", description: "Save path (default: Assets/Screenshots/EditorWindow_timestamp.png). Must end in .png; any folder is allowed." },
|
|
2709
|
+
maxDimension: { type: "number", description: "Max pixels per side before the capture is rejected (default: 8192; also clamped to the GPU max texture size)." },
|
|
2710
|
+
},
|
|
2711
|
+
required: ["window"],
|
|
2712
|
+
},
|
|
2713
|
+
handler: async (params) => JSON.stringify(await bridge.captureEditorWindow(params), null, 2),
|
|
2714
|
+
},
|
|
2715
|
+
{
|
|
2716
|
+
name: "unity_sceneview_info",
|
|
2717
|
+
description: "Get Scene View camera info: pivot position, rotation, zoom, orthographic mode, 2D mode.",
|
|
2718
|
+
inputSchema: { type: "object", properties: {} },
|
|
2719
|
+
handler: async (params) => JSON.stringify(await bridge.getSceneViewInfo(params), null, 2),
|
|
2720
|
+
},
|
|
2721
|
+
{
|
|
2722
|
+
name: "unity_sceneview_set_camera",
|
|
2723
|
+
description: "Control the Scene View camera: set pivot, rotation, zoom, orthographic mode, look-at target, or frame selection.",
|
|
2724
|
+
inputSchema: {
|
|
2725
|
+
type: "object",
|
|
2726
|
+
properties: {
|
|
2727
|
+
pivot: { type: "object", description: "Camera pivot position { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
2728
|
+
rotation: { type: "object", description: "Camera rotation (Euler angles) { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
2729
|
+
size: { type: "number", description: "Zoom level / camera size" },
|
|
2730
|
+
orthographic: { type: "boolean", description: "Orthographic projection mode" },
|
|
2731
|
+
is2D: { type: "boolean", description: "2D mode" },
|
|
2732
|
+
lookAt: { type: "object", description: "Point to look at { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
2733
|
+
lookAtSize: { type: "number", description: "Size when using lookAt (default: 10)" },
|
|
2734
|
+
frameSelected: { type: "boolean", description: "Frame the currently selected object" },
|
|
2735
|
+
},
|
|
2736
|
+
},
|
|
2737
|
+
handler: async (params) => JSON.stringify(await bridge.setSceneViewCamera(params), null, 2),
|
|
2738
|
+
},
|
|
2739
|
+
|
|
2740
|
+
// ─── Graphics & Visuals ───
|
|
2741
|
+
{
|
|
2742
|
+
name: "unity_graphics_asset_preview",
|
|
2743
|
+
description:
|
|
2744
|
+
"Get a visual preview thumbnail of any Unity asset (prefab, material, texture, mesh, etc.) as an inline image. Returns base64 PNG image that Claude can see directly.",
|
|
2745
|
+
inputSchema: {
|
|
2746
|
+
type: "object",
|
|
2747
|
+
properties: {
|
|
2748
|
+
assetPath: {
|
|
2749
|
+
type: "string",
|
|
2750
|
+
description:
|
|
2751
|
+
"Asset path (e.g. 'Assets/Models/Character.fbx', 'Assets/Materials/Wood.mat')",
|
|
2752
|
+
},
|
|
2753
|
+
width: {
|
|
2754
|
+
type: "number",
|
|
2755
|
+
description: "Preview width in pixels (default: 256)",
|
|
2756
|
+
},
|
|
2757
|
+
height: {
|
|
2758
|
+
type: "number",
|
|
2759
|
+
description: "Preview height in pixels (default: 256)",
|
|
2760
|
+
},
|
|
2761
|
+
},
|
|
2762
|
+
required: ["assetPath"],
|
|
2763
|
+
},
|
|
2764
|
+
handler: async (params) => {
|
|
2765
|
+
const result = await bridge.captureAssetPreview(params);
|
|
2766
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2767
|
+
const metadata = { ...result };
|
|
2768
|
+
delete metadata.base64;
|
|
2769
|
+
return [
|
|
2770
|
+
{ type: "image", data: result.base64, mimeType: "image/png" },
|
|
2771
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2772
|
+
];
|
|
2773
|
+
},
|
|
2774
|
+
},
|
|
2775
|
+
{
|
|
2776
|
+
name: "unity_graphics_scene_capture",
|
|
2777
|
+
description:
|
|
2778
|
+
"Capture the current Scene View as an inline image. Returns base64 PNG that Claude can see directly. Use to visually inspect the scene layout.",
|
|
2779
|
+
inputSchema: {
|
|
2780
|
+
type: "object",
|
|
2781
|
+
properties: {
|
|
2782
|
+
width: {
|
|
2783
|
+
type: "number",
|
|
2784
|
+
description: "Image width in pixels (default: 512)",
|
|
2785
|
+
},
|
|
2786
|
+
height: {
|
|
2787
|
+
type: "number",
|
|
2788
|
+
description: "Image height in pixels (default: 512)",
|
|
2789
|
+
},
|
|
2790
|
+
},
|
|
2791
|
+
},
|
|
2792
|
+
handler: async (params) => {
|
|
2793
|
+
const result = await bridge.captureSceneViewGraphics(params);
|
|
2794
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2795
|
+
// Bridge wraps response: { success, data: { success, base64 } }
|
|
2796
|
+
const imageData = result.data?.base64 || result.base64;
|
|
2797
|
+
if (!imageData || typeof imageData !== "string") {
|
|
2798
|
+
return JSON.stringify({ error: "Scene capture returned no image data", ...result }, null, 2);
|
|
2799
|
+
}
|
|
2800
|
+
const metadata = { ...result };
|
|
2801
|
+
delete metadata.base64;
|
|
2802
|
+
if (metadata.data) delete metadata.data.base64;
|
|
2803
|
+
const b64 = imageData.replace(/^data:image\/\w+;base64,/, "");
|
|
2804
|
+
return [
|
|
2805
|
+
{ type: "image", data: b64, mimeType: "image/png" },
|
|
2806
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2807
|
+
];
|
|
2808
|
+
},
|
|
2809
|
+
},
|
|
2810
|
+
{
|
|
2811
|
+
name: "unity_graphics_game_capture",
|
|
2812
|
+
description:
|
|
2813
|
+
"Capture the Game View camera as an inline image. Returns base64 PNG that Claude can see directly. Use to see what the player sees.",
|
|
2814
|
+
inputSchema: {
|
|
2815
|
+
type: "object",
|
|
2816
|
+
properties: {
|
|
2817
|
+
width: {
|
|
2818
|
+
type: "number",
|
|
2819
|
+
description: "Image width in pixels (default: 512)",
|
|
2820
|
+
},
|
|
2821
|
+
height: {
|
|
2822
|
+
type: "number",
|
|
2823
|
+
description: "Image height in pixels (default: 512)",
|
|
2824
|
+
},
|
|
2825
|
+
cameraName: {
|
|
2826
|
+
type: "string",
|
|
2827
|
+
description:
|
|
2828
|
+
"Name of camera to use (default: Camera.main / MainCamera tag)",
|
|
2829
|
+
},
|
|
2830
|
+
},
|
|
2831
|
+
},
|
|
2832
|
+
handler: async (params) => {
|
|
2833
|
+
const result = await bridge.captureGameViewGraphics(params);
|
|
2834
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2835
|
+
// Bridge wraps response: { success, data: { success, base64 } }
|
|
2836
|
+
const imageData = result.data?.base64 || result.base64;
|
|
2837
|
+
if (!imageData || typeof imageData !== "string") {
|
|
2838
|
+
return JSON.stringify({ error: "Game capture returned no image data", ...result }, null, 2);
|
|
2839
|
+
}
|
|
2840
|
+
const metadata = { ...result };
|
|
2841
|
+
delete metadata.base64;
|
|
2842
|
+
if (metadata.data) delete metadata.data.base64;
|
|
2843
|
+
const b64 = imageData.replace(/^data:image\/\w+;base64,/, "");
|
|
2844
|
+
return [
|
|
2845
|
+
{ type: "image", data: b64, mimeType: "image/png" },
|
|
2846
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2847
|
+
];
|
|
2848
|
+
},
|
|
2849
|
+
},
|
|
2850
|
+
{
|
|
2851
|
+
name: "unity_graphics_prefab_render",
|
|
2852
|
+
description:
|
|
2853
|
+
"Render a prefab from a configurable angle as an inline image. Returns base64 PNG that Claude can see directly. Great for previewing 3D models and prefabs.",
|
|
2854
|
+
inputSchema: {
|
|
2855
|
+
type: "object",
|
|
2856
|
+
properties: {
|
|
2857
|
+
assetPath: {
|
|
2858
|
+
type: "string",
|
|
2859
|
+
description: "Prefab asset path (e.g. 'Assets/Prefabs/Enemy.prefab')",
|
|
2860
|
+
},
|
|
2861
|
+
width: {
|
|
2862
|
+
type: "number",
|
|
2863
|
+
description: "Image width in pixels (default: 512)",
|
|
2864
|
+
},
|
|
2865
|
+
height: {
|
|
2866
|
+
type: "number",
|
|
2867
|
+
description: "Image height in pixels (default: 512)",
|
|
2868
|
+
},
|
|
2869
|
+
rotationY: {
|
|
2870
|
+
type: "number",
|
|
2871
|
+
description:
|
|
2872
|
+
"Horizontal rotation angle in degrees (default: 30). Controls left-right viewing angle.",
|
|
2873
|
+
},
|
|
2874
|
+
rotationX: {
|
|
2875
|
+
type: "number",
|
|
2876
|
+
description:
|
|
2877
|
+
"Vertical rotation angle in degrees (default: 20). Controls up-down viewing angle.",
|
|
2878
|
+
},
|
|
2879
|
+
padding: {
|
|
2880
|
+
type: "number",
|
|
2881
|
+
description:
|
|
2882
|
+
"Padding multiplier around the object (default: 1.2). Higher = more space around object.",
|
|
2883
|
+
},
|
|
2884
|
+
},
|
|
2885
|
+
required: ["assetPath"],
|
|
2886
|
+
},
|
|
2887
|
+
handler: async (params) => {
|
|
2888
|
+
const result = await bridge.renderPrefabPreview(params);
|
|
2889
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2890
|
+
const metadata = { ...result };
|
|
2891
|
+
delete metadata.base64;
|
|
2892
|
+
return [
|
|
2893
|
+
{ type: "image", data: result.base64, mimeType: "image/png" },
|
|
2894
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2895
|
+
];
|
|
2896
|
+
},
|
|
2897
|
+
},
|
|
2898
|
+
{
|
|
2899
|
+
name: "unity_graphics_mesh_info",
|
|
2900
|
+
description:
|
|
2901
|
+
"Get detailed mesh geometry information: vertex count, triangle count, submeshes, UV channels, blend shapes, bone count, bounds. Works on mesh assets or scene GameObjects with MeshFilter/SkinnedMeshRenderer.",
|
|
2902
|
+
inputSchema: {
|
|
2903
|
+
type: "object",
|
|
2904
|
+
properties: {
|
|
2905
|
+
assetPath: {
|
|
2906
|
+
type: "string",
|
|
2907
|
+
description:
|
|
2908
|
+
"Mesh asset path (e.g. 'Assets/Models/Character.fbx'). Use this OR objectPath.",
|
|
2909
|
+
},
|
|
2910
|
+
objectPath: {
|
|
2911
|
+
type: "string",
|
|
2912
|
+
description:
|
|
2913
|
+
"Scene GameObject path to get mesh from its MeshFilter or SkinnedMeshRenderer. Use this OR assetPath.",
|
|
2914
|
+
},
|
|
2915
|
+
},
|
|
2916
|
+
},
|
|
2917
|
+
handler: async (params) =>
|
|
2918
|
+
JSON.stringify(await bridge.getMeshInfo(params), null, 2),
|
|
2919
|
+
},
|
|
2920
|
+
{
|
|
2921
|
+
name: "unity_graphics_material_info",
|
|
2922
|
+
description:
|
|
2923
|
+
"Get detailed material information: shader name, render queue, all properties (colors, floats, vectors, textures), keywords, and a visual preview thumbnail. Works on material assets or scene GameObjects.",
|
|
2924
|
+
inputSchema: {
|
|
2925
|
+
type: "object",
|
|
2926
|
+
properties: {
|
|
2927
|
+
assetPath: {
|
|
2928
|
+
type: "string",
|
|
2929
|
+
description:
|
|
2930
|
+
"Material asset path (e.g. 'Assets/Materials/Wood.mat'). Use this OR objectPath.",
|
|
2931
|
+
},
|
|
2932
|
+
objectPath: {
|
|
2933
|
+
type: "string",
|
|
2934
|
+
description:
|
|
2935
|
+
"Scene GameObject path to get material from its Renderer. Use this OR assetPath.",
|
|
2936
|
+
},
|
|
2937
|
+
materialIndex: {
|
|
2938
|
+
type: "number",
|
|
2939
|
+
description:
|
|
2940
|
+
"Material index on the Renderer (default: 0). Only used with objectPath.",
|
|
2941
|
+
},
|
|
2942
|
+
includePreview: {
|
|
2943
|
+
type: "boolean",
|
|
2944
|
+
description:
|
|
2945
|
+
"Include a base64 PNG preview thumbnail (default: true)",
|
|
2946
|
+
},
|
|
2947
|
+
},
|
|
2948
|
+
},
|
|
2949
|
+
handler: async (params) => {
|
|
2950
|
+
const result = await bridge.getMaterialInfo(params);
|
|
2951
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2952
|
+
if (result.base64) {
|
|
2953
|
+
const metadata = { ...result };
|
|
2954
|
+
delete metadata.base64;
|
|
2955
|
+
return [
|
|
2956
|
+
{ type: "image", data: result.base64, mimeType: "image/png" },
|
|
2957
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2958
|
+
];
|
|
2959
|
+
}
|
|
2960
|
+
return JSON.stringify(result, null, 2);
|
|
2961
|
+
},
|
|
2962
|
+
},
|
|
2963
|
+
{
|
|
2964
|
+
name: "unity_graphics_texture_info",
|
|
2965
|
+
description:
|
|
2966
|
+
"Get detailed texture information: dimensions, format, compression, mipmaps, memory estimate, import settings, and a visual preview thumbnail. Use for texture analysis and optimization.",
|
|
2967
|
+
inputSchema: {
|
|
2968
|
+
type: "object",
|
|
2969
|
+
properties: {
|
|
2970
|
+
assetPath: {
|
|
2971
|
+
type: "string",
|
|
2972
|
+
description:
|
|
2973
|
+
"Texture asset path (e.g. 'Assets/Textures/Wood_Diffuse.png')",
|
|
2974
|
+
},
|
|
2975
|
+
previewSize: {
|
|
2976
|
+
type: "number",
|
|
2977
|
+
description:
|
|
2978
|
+
"Preview thumbnail size in pixels (default: 128). Set 0 to skip preview.",
|
|
2979
|
+
},
|
|
2980
|
+
},
|
|
2981
|
+
required: ["assetPath"],
|
|
2982
|
+
},
|
|
2983
|
+
handler: async (params) => {
|
|
2984
|
+
const result = await bridge.getTextureInfoGraphics(params);
|
|
2985
|
+
if (result.error) return JSON.stringify(result, null, 2);
|
|
2986
|
+
if (result.base64) {
|
|
2987
|
+
const metadata = { ...result };
|
|
2988
|
+
delete metadata.base64;
|
|
2989
|
+
return [
|
|
2990
|
+
{ type: "image", data: result.base64, mimeType: "image/png" },
|
|
2991
|
+
{ type: "text", text: JSON.stringify(metadata, null, 2) },
|
|
2992
|
+
];
|
|
2993
|
+
}
|
|
2994
|
+
return JSON.stringify(result, null, 2);
|
|
2995
|
+
},
|
|
2996
|
+
},
|
|
2997
|
+
{
|
|
2998
|
+
name: "unity_graphics_renderer_info",
|
|
2999
|
+
description:
|
|
3000
|
+
"Get detailed Renderer component information: renderer type, materials list, mesh reference, bounds, shadow settings, sorting layer, lightmap index. Use for rendering analysis.",
|
|
3001
|
+
inputSchema: {
|
|
3002
|
+
type: "object",
|
|
3003
|
+
properties: {
|
|
3004
|
+
objectPath: {
|
|
3005
|
+
type: "string",
|
|
3006
|
+
description: "Scene GameObject path with a Renderer component",
|
|
3007
|
+
},
|
|
3008
|
+
},
|
|
3009
|
+
required: ["objectPath"],
|
|
3010
|
+
},
|
|
3011
|
+
handler: async (params) =>
|
|
3012
|
+
JSON.stringify(await bridge.getRendererInfo(params), null, 2),
|
|
3013
|
+
},
|
|
3014
|
+
{
|
|
3015
|
+
name: "unity_graphics_lighting_summary",
|
|
3016
|
+
description:
|
|
3017
|
+
"Get a summary of all lights in the scene, or details about a specific light. Returns type, color, intensity, range, spot angle, shadow settings, and render mode.",
|
|
3018
|
+
inputSchema: {
|
|
3019
|
+
type: "object",
|
|
3020
|
+
properties: {
|
|
3021
|
+
lightName: {
|
|
3022
|
+
type: "string",
|
|
3023
|
+
description:
|
|
3024
|
+
"Optional: name of a specific light to get details for. If omitted, returns all lights.",
|
|
3025
|
+
},
|
|
3026
|
+
},
|
|
3027
|
+
},
|
|
3028
|
+
handler: async (params) =>
|
|
3029
|
+
JSON.stringify(await bridge.getLightingSummary(params), null, 2),
|
|
3030
|
+
},
|
|
3031
|
+
|
|
3032
|
+
// ─── Terrain ───
|
|
3033
|
+
{
|
|
3034
|
+
name: "unity_terrain_create",
|
|
3035
|
+
description: "Create a new Terrain in the scene with configurable size and heightmap resolution.",
|
|
3036
|
+
inputSchema: {
|
|
3037
|
+
type: "object",
|
|
3038
|
+
properties: {
|
|
3039
|
+
name: { type: "string", description: "Terrain name (default: 'Terrain')" },
|
|
3040
|
+
width: { type: "number", description: "Terrain width in units (default: 1000)" },
|
|
3041
|
+
length: { type: "number", description: "Terrain length in units (default: 1000)" },
|
|
3042
|
+
height: { type: "number", description: "Maximum terrain height (default: 600)" },
|
|
3043
|
+
heightmapResolution: { type: "number", description: "Heightmap resolution, must be power of 2 + 1 (default: 513)" },
|
|
3044
|
+
position: { type: "object", description: "World position { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
3045
|
+
dataPath: { type: "string", description: "Path to save terrain data asset (default: Assets/TerrainName_Data.asset)" },
|
|
3046
|
+
},
|
|
3047
|
+
},
|
|
3048
|
+
handler: async (params) => JSON.stringify(await bridge.createTerrain(params), null, 2),
|
|
3049
|
+
},
|
|
3050
|
+
{
|
|
3051
|
+
name: "unity_terrain_info",
|
|
3052
|
+
description: "Get detailed terrain information: size, resolution, layers, tree/detail counts, settings.",
|
|
3053
|
+
inputSchema: {
|
|
3054
|
+
type: "object",
|
|
3055
|
+
properties: {
|
|
3056
|
+
name: { type: "string", description: "Terrain name. If omitted, uses the active terrain." },
|
|
3057
|
+
},
|
|
3058
|
+
},
|
|
3059
|
+
handler: async (params) => JSON.stringify(await bridge.getTerrainInfo(params), null, 2),
|
|
3060
|
+
},
|
|
3061
|
+
{
|
|
3062
|
+
name: "unity_terrain_set_height",
|
|
3063
|
+
description: "Set terrain height at a position with optional radius falloff. Coordinates are normalized (0-1).",
|
|
3064
|
+
inputSchema: {
|
|
3065
|
+
type: "object",
|
|
3066
|
+
properties: {
|
|
3067
|
+
x: { type: "number", description: "Normalized X position (0-1)" },
|
|
3068
|
+
z: { type: "number", description: "Normalized Z position (0-1)" },
|
|
3069
|
+
height: { type: "number", description: "Height value (0-1, where 1 = max terrain height)" },
|
|
3070
|
+
radius: { type: "number", description: "Brush radius in heightmap pixels (default: 1)" },
|
|
3071
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3072
|
+
},
|
|
3073
|
+
required: ["x", "z", "height"],
|
|
3074
|
+
},
|
|
3075
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainHeight(params), null, 2),
|
|
3076
|
+
},
|
|
3077
|
+
{
|
|
3078
|
+
name: "unity_terrain_flatten",
|
|
3079
|
+
description: "Flatten the entire terrain to a uniform height.",
|
|
3080
|
+
inputSchema: {
|
|
3081
|
+
type: "object",
|
|
3082
|
+
properties: {
|
|
3083
|
+
height: { type: "number", description: "Height value (0-1, default: 0)" },
|
|
3084
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3085
|
+
},
|
|
3086
|
+
},
|
|
3087
|
+
handler: async (params) => JSON.stringify(await bridge.flattenTerrain(params), null, 2),
|
|
3088
|
+
},
|
|
3089
|
+
{
|
|
3090
|
+
name: "unity_terrain_add_layer",
|
|
3091
|
+
description: "Add a texture layer to the terrain for painting.",
|
|
3092
|
+
inputSchema: {
|
|
3093
|
+
type: "object",
|
|
3094
|
+
properties: {
|
|
3095
|
+
texturePath: { type: "string", description: "Asset path of the diffuse texture" },
|
|
3096
|
+
normalMapPath: { type: "string", description: "Asset path of the normal map texture (optional)" },
|
|
3097
|
+
tileSizeX: { type: "number", description: "Tile size X (default: 10)" },
|
|
3098
|
+
tileSizeY: { type: "number", description: "Tile size Y (default: 10)" },
|
|
3099
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3100
|
+
},
|
|
3101
|
+
required: ["texturePath"],
|
|
3102
|
+
},
|
|
3103
|
+
handler: async (params) => JSON.stringify(await bridge.addTerrainLayer(params), null, 2),
|
|
3104
|
+
},
|
|
3105
|
+
{
|
|
3106
|
+
name: "unity_terrain_get_height",
|
|
3107
|
+
description: "Sample the terrain height at a world position.",
|
|
3108
|
+
inputSchema: {
|
|
3109
|
+
type: "object",
|
|
3110
|
+
properties: {
|
|
3111
|
+
worldX: { type: "number", description: "World X coordinate" },
|
|
3112
|
+
worldZ: { type: "number", description: "World Z coordinate" },
|
|
3113
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3114
|
+
},
|
|
3115
|
+
required: ["worldX", "worldZ"],
|
|
3116
|
+
},
|
|
3117
|
+
handler: async (params) => JSON.stringify(await bridge.getTerrainHeight(params), null, 2),
|
|
3118
|
+
},
|
|
3119
|
+
{
|
|
3120
|
+
name: "unity_terrain_list",
|
|
3121
|
+
description: "List all terrains in the scene with their names, positions, sizes, and basic info.",
|
|
3122
|
+
inputSchema: { type: "object", properties: {} },
|
|
3123
|
+
handler: async (params) => JSON.stringify(await bridge.listTerrains(params), null, 2),
|
|
3124
|
+
},
|
|
3125
|
+
{
|
|
3126
|
+
name: "unity_terrain_raise_lower",
|
|
3127
|
+
description: "Raise or lower terrain height at a normalized position with a brush radius and falloff. Use positive delta to raise, negative to lower.",
|
|
3128
|
+
inputSchema: {
|
|
3129
|
+
type: "object",
|
|
3130
|
+
properties: {
|
|
3131
|
+
x: { type: "number", description: "Normalized X position (0-1)" },
|
|
3132
|
+
z: { type: "number", description: "Normalized Z position (0-1)" },
|
|
3133
|
+
delta: { type: "number", description: "Height change amount (-1 to 1). Positive raises, negative lowers." },
|
|
3134
|
+
radius: { type: "number", description: "Brush radius in heightmap pixels (default: 10)" },
|
|
3135
|
+
falloff: { type: "string", description: "Falloff type: 'linear', 'smooth', or 'constant' (default: 'smooth')" },
|
|
3136
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3137
|
+
},
|
|
3138
|
+
required: ["x", "z", "delta"],
|
|
3139
|
+
},
|
|
3140
|
+
handler: async (params) => JSON.stringify(await bridge.raiseLowerTerrainHeight(params), null, 2),
|
|
3141
|
+
},
|
|
3142
|
+
{
|
|
3143
|
+
name: "unity_terrain_smooth",
|
|
3144
|
+
description: "Smooth terrain heights at a normalized position to reduce sharp edges. Uses kernel averaging.",
|
|
3145
|
+
inputSchema: {
|
|
3146
|
+
type: "object",
|
|
3147
|
+
properties: {
|
|
3148
|
+
x: { type: "number", description: "Normalized X position (0-1)" },
|
|
3149
|
+
z: { type: "number", description: "Normalized Z position (0-1)" },
|
|
3150
|
+
radius: { type: "number", description: "Brush radius in heightmap pixels (default: 10)" },
|
|
3151
|
+
strength: { type: "number", description: "Smoothing strength 0-1 (default: 0.5)" },
|
|
3152
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3153
|
+
},
|
|
3154
|
+
required: ["x", "z"],
|
|
3155
|
+
},
|
|
3156
|
+
handler: async (params) => JSON.stringify(await bridge.smoothTerrainHeight(params), null, 2),
|
|
3157
|
+
},
|
|
3158
|
+
{
|
|
3159
|
+
name: "unity_terrain_noise",
|
|
3160
|
+
description: "Apply Perlin noise to the entire terrain heightmap. Great for generating natural-looking terrain.",
|
|
3161
|
+
inputSchema: {
|
|
3162
|
+
type: "object",
|
|
3163
|
+
properties: {
|
|
3164
|
+
scale: { type: "number", description: "Noise scale / frequency (default: 20)" },
|
|
3165
|
+
amplitude: { type: "number", description: "Noise amplitude 0-1 (default: 0.1)" },
|
|
3166
|
+
octaves: { type: "number", description: "Number of noise octaves for detail (default: 4)" },
|
|
3167
|
+
seed: { type: "number", description: "Random seed (default: 0)" },
|
|
3168
|
+
additive: { type: "boolean", description: "If true, adds noise to existing heights. If false, replaces (default: false)" },
|
|
3169
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3170
|
+
},
|
|
3171
|
+
},
|
|
3172
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainNoise(params), null, 2),
|
|
3173
|
+
},
|
|
3174
|
+
{
|
|
3175
|
+
name: "unity_terrain_set_heights_region",
|
|
3176
|
+
description: "Set heights for a rectangular region of the heightmap. Heights are normalized 0-1.",
|
|
3177
|
+
inputSchema: {
|
|
3178
|
+
type: "object",
|
|
3179
|
+
properties: {
|
|
3180
|
+
xBase: { type: "number", description: "Start X index in heightmap" },
|
|
3181
|
+
yBase: { type: "number", description: "Start Y index in heightmap" },
|
|
3182
|
+
heights: { type: "array", description: "2D array of height values [row][col], each 0-1", items: { type: "array", items: { type: "number" } } },
|
|
3183
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3184
|
+
},
|
|
3185
|
+
required: ["xBase", "yBase", "heights"],
|
|
3186
|
+
},
|
|
3187
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainHeightsRegion(params), null, 2),
|
|
3188
|
+
},
|
|
3189
|
+
{
|
|
3190
|
+
name: "unity_terrain_get_heights_region",
|
|
3191
|
+
description: "Get heights for a rectangular region of the heightmap. Returns normalized 0-1 values.",
|
|
3192
|
+
inputSchema: {
|
|
3193
|
+
type: "object",
|
|
3194
|
+
properties: {
|
|
3195
|
+
xBase: { type: "number", description: "Start X index in heightmap" },
|
|
3196
|
+
yBase: { type: "number", description: "Start Y index in heightmap" },
|
|
3197
|
+
width: { type: "number", description: "Width of region to read" },
|
|
3198
|
+
height: { type: "number", description: "Height of region to read" },
|
|
3199
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3200
|
+
},
|
|
3201
|
+
required: ["xBase", "yBase", "width", "height"],
|
|
3202
|
+
},
|
|
3203
|
+
handler: async (params) => JSON.stringify(await bridge.getTerrainHeightsRegion(params), null, 2),
|
|
3204
|
+
},
|
|
3205
|
+
{
|
|
3206
|
+
name: "unity_terrain_remove_layer",
|
|
3207
|
+
description: "Remove a texture layer from the terrain by index.",
|
|
3208
|
+
inputSchema: {
|
|
3209
|
+
type: "object",
|
|
3210
|
+
properties: {
|
|
3211
|
+
layerIndex: { type: "number", description: "Index of the terrain layer to remove" },
|
|
3212
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3213
|
+
},
|
|
3214
|
+
required: ["layerIndex"],
|
|
3215
|
+
},
|
|
3216
|
+
handler: async (params) => JSON.stringify(await bridge.removeTerrainLayer(params), null, 2),
|
|
3217
|
+
},
|
|
3218
|
+
{
|
|
3219
|
+
name: "unity_terrain_paint_layer",
|
|
3220
|
+
description: "Paint a terrain texture layer at a normalized position with brush radius, opacity and falloff.",
|
|
3221
|
+
inputSchema: {
|
|
3222
|
+
type: "object",
|
|
3223
|
+
properties: {
|
|
3224
|
+
x: { type: "number", description: "Normalized X position (0-1)" },
|
|
3225
|
+
z: { type: "number", description: "Normalized Z position (0-1)" },
|
|
3226
|
+
layerIndex: { type: "number", description: "Index of the terrain layer to paint" },
|
|
3227
|
+
radius: { type: "number", description: "Brush radius in alphamap pixels (default: 10)" },
|
|
3228
|
+
opacity: { type: "number", description: "Paint opacity 0-1 (default: 1.0)" },
|
|
3229
|
+
falloff: { type: "string", description: "Falloff type: 'linear', 'smooth', or 'constant' (default: 'smooth')" },
|
|
3230
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3231
|
+
},
|
|
3232
|
+
required: ["x", "z", "layerIndex"],
|
|
3233
|
+
},
|
|
3234
|
+
handler: async (params) => JSON.stringify(await bridge.paintTerrainLayer(params), null, 2),
|
|
3235
|
+
},
|
|
3236
|
+
{
|
|
3237
|
+
name: "unity_terrain_fill_layer",
|
|
3238
|
+
description: "Fill the entire terrain with a single texture layer (sets that layer to 100% everywhere).",
|
|
3239
|
+
inputSchema: {
|
|
3240
|
+
type: "object",
|
|
3241
|
+
properties: {
|
|
3242
|
+
layerIndex: { type: "number", description: "Index of the terrain layer to fill with" },
|
|
3243
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3244
|
+
},
|
|
3245
|
+
required: ["layerIndex"],
|
|
3246
|
+
},
|
|
3247
|
+
handler: async (params) => JSON.stringify(await bridge.fillTerrainLayer(params), null, 2),
|
|
3248
|
+
},
|
|
3249
|
+
{
|
|
3250
|
+
name: "unity_terrain_add_tree_prototype",
|
|
3251
|
+
description: "Add a tree prefab prototype to the terrain for tree placement.",
|
|
3252
|
+
inputSchema: {
|
|
3253
|
+
type: "object",
|
|
3254
|
+
properties: {
|
|
3255
|
+
prefabPath: { type: "string", description: "Asset path to the tree prefab (e.g. 'Assets/Trees/Oak.prefab')" },
|
|
3256
|
+
bendFactor: { type: "number", description: "Wind bend factor (default: 0)" },
|
|
3257
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3258
|
+
},
|
|
3259
|
+
required: ["prefabPath"],
|
|
3260
|
+
},
|
|
3261
|
+
handler: async (params) => JSON.stringify(await bridge.addTerrainTreePrototype(params), null, 2),
|
|
3262
|
+
},
|
|
3263
|
+
{
|
|
3264
|
+
name: "unity_terrain_remove_tree_prototype",
|
|
3265
|
+
description: "Remove a tree prototype from the terrain by index. Also removes all placed instances of that prototype.",
|
|
3266
|
+
inputSchema: {
|
|
3267
|
+
type: "object",
|
|
3268
|
+
properties: {
|
|
3269
|
+
prototypeIndex: { type: "number", description: "Index of the tree prototype to remove" },
|
|
3270
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3271
|
+
},
|
|
3272
|
+
required: ["prototypeIndex"],
|
|
3273
|
+
},
|
|
3274
|
+
handler: async (params) => JSON.stringify(await bridge.removeTerrainTreePrototype(params), null, 2),
|
|
3275
|
+
},
|
|
3276
|
+
{
|
|
3277
|
+
name: "unity_terrain_place_trees",
|
|
3278
|
+
description: "Place trees on the terrain. Supports random scatter over an area or manual positions. Scatter mode supports steepness and altitude filtering.",
|
|
3279
|
+
inputSchema: {
|
|
3280
|
+
type: "object",
|
|
3281
|
+
properties: {
|
|
3282
|
+
prototypeIndex: { type: "number", description: "Index of the tree prototype to place" },
|
|
3283
|
+
count: { type: "number", description: "Number of trees for random scatter mode" },
|
|
3284
|
+
area: { type: "object", description: "Scatter area { xMin, xMax, zMin, zMax } normalized 0-1 (default: entire terrain)", properties: { xMin: { type: "number" }, xMax: { type: "number" }, zMin: { type: "number" }, zMax: { type: "number" } } },
|
|
3285
|
+
positions: { type: "array", description: "Manual positions array of { x, z } normalized 0-1. Overrides scatter mode.", items: { type: "object", properties: { x: { type: "number" }, z: { type: "number" } } } },
|
|
3286
|
+
minHeight: { type: "number", description: "Min tree height scale (default: 0.8)" },
|
|
3287
|
+
maxHeight: { type: "number", description: "Max tree height scale (default: 1.2)" },
|
|
3288
|
+
minWidth: { type: "number", description: "Min tree width scale (default: 0.8)" },
|
|
3289
|
+
maxWidth: { type: "number", description: "Max tree width scale (default: 1.2)" },
|
|
3290
|
+
minSteepness: { type: "number", description: "Min terrain steepness in degrees for placement (default: 0)" },
|
|
3291
|
+
maxSteepness: { type: "number", description: "Max terrain steepness in degrees for placement (default: 90)" },
|
|
3292
|
+
minAltitude: { type: "number", description: "Min terrain altitude (world units) for placement" },
|
|
3293
|
+
maxAltitude: { type: "number", description: "Max terrain altitude (world units) for placement" },
|
|
3294
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3295
|
+
},
|
|
3296
|
+
required: ["prototypeIndex"],
|
|
3297
|
+
},
|
|
3298
|
+
handler: async (params) => JSON.stringify(await bridge.placeTerrainTrees(params), null, 2),
|
|
3299
|
+
},
|
|
3300
|
+
{
|
|
3301
|
+
name: "unity_terrain_clear_trees",
|
|
3302
|
+
description: "Clear all trees from the terrain, optionally filtering by prototype index.",
|
|
3303
|
+
inputSchema: {
|
|
3304
|
+
type: "object",
|
|
3305
|
+
properties: {
|
|
3306
|
+
prototypeIndex: { type: "number", description: "If specified, only remove trees of this prototype index" },
|
|
3307
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3308
|
+
},
|
|
3309
|
+
},
|
|
3310
|
+
handler: async (params) => JSON.stringify(await bridge.clearTerrainTrees(params), null, 2),
|
|
3311
|
+
},
|
|
3312
|
+
{
|
|
3313
|
+
name: "unity_terrain_get_tree_instances",
|
|
3314
|
+
description: "Get all tree instances on the terrain. Returns positions, prototype indices, scales, and count.",
|
|
3315
|
+
inputSchema: {
|
|
3316
|
+
type: "object",
|
|
3317
|
+
properties: {
|
|
3318
|
+
limit: { type: "number", description: "Max number of trees to return (default: 500)" },
|
|
3319
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3320
|
+
},
|
|
3321
|
+
},
|
|
3322
|
+
handler: async (params) => JSON.stringify(await bridge.getTerrainTreeInstances(params), null, 2),
|
|
3323
|
+
},
|
|
3324
|
+
{
|
|
3325
|
+
name: "unity_terrain_add_detail_prototype",
|
|
3326
|
+
description: "Add a detail/grass prototype to the terrain. Use texturePath for grass billboards or prefabPath for mesh details.",
|
|
3327
|
+
inputSchema: {
|
|
3328
|
+
type: "object",
|
|
3329
|
+
properties: {
|
|
3330
|
+
texturePath: { type: "string", description: "Asset path for grass texture (billboard mode)" },
|
|
3331
|
+
prefabPath: { type: "string", description: "Asset path for detail mesh prefab" },
|
|
3332
|
+
minWidth: { type: "number", description: "Min width (default: 1)" },
|
|
3333
|
+
maxWidth: { type: "number", description: "Max width (default: 2)" },
|
|
3334
|
+
minHeight: { type: "number", description: "Min height (default: 1)" },
|
|
3335
|
+
maxHeight: { type: "number", description: "Max height (default: 2)" },
|
|
3336
|
+
dryColor: { type: "object", description: "Dry color { r, g, b, a } 0-1", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } } },
|
|
3337
|
+
healthyColor: { type: "object", description: "Healthy color { r, g, b, a } 0-1", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } } },
|
|
3338
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3339
|
+
},
|
|
3340
|
+
},
|
|
3341
|
+
handler: async (params) => JSON.stringify(await bridge.addTerrainDetailPrototype(params), null, 2),
|
|
3342
|
+
},
|
|
3343
|
+
{
|
|
3344
|
+
name: "unity_terrain_paint_detail",
|
|
3345
|
+
description: "Paint terrain detail/grass at a normalized position with a brush.",
|
|
3346
|
+
inputSchema: {
|
|
3347
|
+
type: "object",
|
|
3348
|
+
properties: {
|
|
3349
|
+
x: { type: "number", description: "Normalized X position (0-1)" },
|
|
3350
|
+
z: { type: "number", description: "Normalized Z position (0-1)" },
|
|
3351
|
+
detailIndex: { type: "number", description: "Index of the detail prototype to paint" },
|
|
3352
|
+
radius: { type: "number", description: "Brush radius in detail pixels (default: 10)" },
|
|
3353
|
+
density: { type: "number", description: "Detail density value 0-16 (default: 8)" },
|
|
3354
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3355
|
+
},
|
|
3356
|
+
required: ["x", "z", "detailIndex"],
|
|
3357
|
+
},
|
|
3358
|
+
handler: async (params) => JSON.stringify(await bridge.paintTerrainDetail(params), null, 2),
|
|
3359
|
+
},
|
|
3360
|
+
{
|
|
3361
|
+
name: "unity_terrain_scatter_detail",
|
|
3362
|
+
description: "Randomly scatter detail/grass across the entire terrain or a region.",
|
|
3363
|
+
inputSchema: {
|
|
3364
|
+
type: "object",
|
|
3365
|
+
properties: {
|
|
3366
|
+
detailIndex: { type: "number", description: "Index of the detail prototype" },
|
|
3367
|
+
density: { type: "number", description: "Detail density value 0-16 (default: 4)" },
|
|
3368
|
+
coverage: { type: "number", description: "Coverage percentage 0-1 (default: 0.5)" },
|
|
3369
|
+
seed: { type: "number", description: "Random seed (default: 0)" },
|
|
3370
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3371
|
+
},
|
|
3372
|
+
required: ["detailIndex"],
|
|
3373
|
+
},
|
|
3374
|
+
handler: async (params) => JSON.stringify(await bridge.scatterTerrainDetail(params), null, 2),
|
|
3375
|
+
},
|
|
3376
|
+
{
|
|
3377
|
+
name: "unity_terrain_clear_detail",
|
|
3378
|
+
description: "Clear all detail/grass from the terrain, optionally filtering by prototype index.",
|
|
3379
|
+
inputSchema: {
|
|
3380
|
+
type: "object",
|
|
3381
|
+
properties: {
|
|
3382
|
+
detailIndex: { type: "number", description: "If specified, only clear this detail prototype index" },
|
|
3383
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3384
|
+
},
|
|
3385
|
+
},
|
|
3386
|
+
handler: async (params) => JSON.stringify(await bridge.clearTerrainDetail(params), null, 2),
|
|
3387
|
+
},
|
|
3388
|
+
{
|
|
3389
|
+
name: "unity_terrain_set_holes",
|
|
3390
|
+
description: "Create or fill holes in the terrain at a region. Holes make the terrain transparent and non-collidable.",
|
|
3391
|
+
inputSchema: {
|
|
3392
|
+
type: "object",
|
|
3393
|
+
properties: {
|
|
3394
|
+
xBase: { type: "number", description: "Start X index in holes map" },
|
|
3395
|
+
yBase: { type: "number", description: "Start Y index in holes map" },
|
|
3396
|
+
holes: { type: "array", description: "2D boolean array [row][col] — true = solid, false = hole", items: { type: "array", items: { type: "boolean" } } },
|
|
3397
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3398
|
+
},
|
|
3399
|
+
required: ["xBase", "yBase", "holes"],
|
|
3400
|
+
},
|
|
3401
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainHoles(params), null, 2),
|
|
3402
|
+
},
|
|
3403
|
+
{
|
|
3404
|
+
name: "unity_terrain_set_settings",
|
|
3405
|
+
description: "Modify terrain rendering and physics settings like pixel error, base map distance, detail density, etc.",
|
|
3406
|
+
inputSchema: {
|
|
3407
|
+
type: "object",
|
|
3408
|
+
properties: {
|
|
3409
|
+
heightmapPixelError: { type: "number", description: "Heightmap pixel error (LOD accuracy, default: 5)" },
|
|
3410
|
+
baseMapDist: { type: "number", description: "Base map distance for texture blending" },
|
|
3411
|
+
detailObjectDistance: { type: "number", description: "Max distance for detail objects" },
|
|
3412
|
+
detailObjectDensity: { type: "number", description: "Detail object density 0-1" },
|
|
3413
|
+
treeDistance: { type: "number", description: "Max distance for trees" },
|
|
3414
|
+
treeBillboardDistance: { type: "number", description: "Distance at which trees become billboards" },
|
|
3415
|
+
treeCrossFadeLength: { type: "number", description: "Cross-fade length for tree LOD transitions" },
|
|
3416
|
+
treeMaximumFullLODCount: { type: "number", description: "Max number of full-LOD trees" },
|
|
3417
|
+
drawHeightmap: { type: "boolean", description: "Whether to draw the heightmap" },
|
|
3418
|
+
drawTreesAndFoliage: { type: "boolean", description: "Whether to draw trees and foliage" },
|
|
3419
|
+
materialPath: { type: "string", description: "Asset path for custom terrain material" },
|
|
3420
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3421
|
+
},
|
|
3422
|
+
},
|
|
3423
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainSettings(params), null, 2),
|
|
3424
|
+
},
|
|
3425
|
+
{
|
|
3426
|
+
name: "unity_terrain_resize",
|
|
3427
|
+
description: "Resize an existing terrain's dimensions or heightmap resolution. Warning: may reset heights.",
|
|
3428
|
+
inputSchema: {
|
|
3429
|
+
type: "object",
|
|
3430
|
+
properties: {
|
|
3431
|
+
width: { type: "number", description: "New terrain width" },
|
|
3432
|
+
length: { type: "number", description: "New terrain length" },
|
|
3433
|
+
height: { type: "number", description: "New max terrain height" },
|
|
3434
|
+
heightmapResolution: { type: "number", description: "New heightmap resolution (power of 2 + 1)" },
|
|
3435
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3436
|
+
},
|
|
3437
|
+
},
|
|
3438
|
+
handler: async (params) => JSON.stringify(await bridge.resizeTerrain(params), null, 2),
|
|
3439
|
+
},
|
|
3440
|
+
{
|
|
3441
|
+
name: "unity_terrain_create_grid",
|
|
3442
|
+
description: "Create a grid of connected terrain tiles for large worlds. Automatically sets up terrain neighbors for seamless LOD transitions.",
|
|
3443
|
+
inputSchema: {
|
|
3444
|
+
type: "object",
|
|
3445
|
+
properties: {
|
|
3446
|
+
rows: { type: "number", description: "Number of rows in the grid" },
|
|
3447
|
+
cols: { type: "number", description: "Number of columns in the grid" },
|
|
3448
|
+
tileWidth: { type: "number", description: "Width of each tile (default: 1000)" },
|
|
3449
|
+
tileLength: { type: "number", description: "Length of each tile (default: 1000)" },
|
|
3450
|
+
tileHeight: { type: "number", description: "Max height of each tile (default: 600)" },
|
|
3451
|
+
heightmapResolution: { type: "number", description: "Heightmap resolution per tile (default: 513)" },
|
|
3452
|
+
baseName: { type: "string", description: "Base name for terrain tiles (default: 'Terrain')" },
|
|
3453
|
+
startPosition: { type: "object", description: "World position of the grid origin { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
3454
|
+
},
|
|
3455
|
+
required: ["rows", "cols"],
|
|
3456
|
+
},
|
|
3457
|
+
handler: async (params) => JSON.stringify(await bridge.createTerrainGrid(params), null, 2),
|
|
3458
|
+
},
|
|
3459
|
+
{
|
|
3460
|
+
name: "unity_terrain_set_neighbors",
|
|
3461
|
+
description: "Set terrain neighbor connections for seamless LOD transitions between tiles.",
|
|
3462
|
+
inputSchema: {
|
|
3463
|
+
type: "object",
|
|
3464
|
+
properties: {
|
|
3465
|
+
terrain: { type: "string", description: "Name of the terrain to set neighbors for" },
|
|
3466
|
+
left: { type: "string", description: "Name of the left neighbor terrain (or null)" },
|
|
3467
|
+
top: { type: "string", description: "Name of the top neighbor terrain (or null)" },
|
|
3468
|
+
right: { type: "string", description: "Name of the right neighbor terrain (or null)" },
|
|
3469
|
+
bottom: { type: "string", description: "Name of the bottom neighbor terrain (or null)" },
|
|
3470
|
+
},
|
|
3471
|
+
required: ["terrain"],
|
|
3472
|
+
},
|
|
3473
|
+
handler: async (params) => JSON.stringify(await bridge.setTerrainNeighbors(params), null, 2),
|
|
3474
|
+
},
|
|
3475
|
+
{
|
|
3476
|
+
name: "unity_terrain_import_heightmap",
|
|
3477
|
+
description: "Import a heightmap from a RAW file or texture asset into the terrain.",
|
|
3478
|
+
inputSchema: {
|
|
3479
|
+
type: "object",
|
|
3480
|
+
properties: {
|
|
3481
|
+
filePath: { type: "string", description: "Path to .raw file (absolute) or asset path to a Texture2D" },
|
|
3482
|
+
format: { type: "string", description: "'raw16' (16-bit RAW, default), 'raw8' (8-bit RAW), or 'texture'" },
|
|
3483
|
+
byteOrder: { type: "string", description: "Byte order for RAW: 'little' (default) or 'big'" },
|
|
3484
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3485
|
+
},
|
|
3486
|
+
required: ["filePath"],
|
|
3487
|
+
},
|
|
3488
|
+
handler: async (params) => JSON.stringify(await bridge.importTerrainHeightmap(params), null, 2),
|
|
3489
|
+
},
|
|
3490
|
+
{
|
|
3491
|
+
name: "unity_terrain_export_heightmap",
|
|
3492
|
+
description: "Export terrain heightmap to a RAW file or PNG texture.",
|
|
3493
|
+
inputSchema: {
|
|
3494
|
+
type: "object",
|
|
3495
|
+
properties: {
|
|
3496
|
+
filePath: { type: "string", description: "Output file path (e.g. 'Assets/Heightmaps/terrain.raw')" },
|
|
3497
|
+
format: { type: "string", description: "'raw16' (16-bit RAW, default) or 'png'" },
|
|
3498
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3499
|
+
},
|
|
3500
|
+
required: ["filePath"],
|
|
3501
|
+
},
|
|
3502
|
+
handler: async (params) => JSON.stringify(await bridge.exportTerrainHeightmap(params), null, 2),
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
name: "unity_terrain_get_steepness",
|
|
3506
|
+
description: "Get the terrain steepness (slope angle in degrees) and surface normal at a world position.",
|
|
3507
|
+
inputSchema: {
|
|
3508
|
+
type: "object",
|
|
3509
|
+
properties: {
|
|
3510
|
+
worldX: { type: "number", description: "World X coordinate" },
|
|
3511
|
+
worldZ: { type: "number", description: "World Z coordinate" },
|
|
3512
|
+
name: { type: "string", description: "Terrain name (optional)" },
|
|
3513
|
+
},
|
|
3514
|
+
required: ["worldX", "worldZ"],
|
|
3515
|
+
},
|
|
3516
|
+
handler: async (params) => JSON.stringify(await bridge.getTerrainSteepness(params), null, 2),
|
|
3517
|
+
},
|
|
3518
|
+
|
|
3519
|
+
// ─── Particle System ───
|
|
3520
|
+
{
|
|
3521
|
+
name: "unity_particle_create",
|
|
3522
|
+
description: "Create a new Particle System with optional initial settings.",
|
|
3523
|
+
inputSchema: {
|
|
3524
|
+
type: "object",
|
|
3525
|
+
properties: {
|
|
3526
|
+
name: { type: "string", description: "GameObject name (default: 'Particle System')" },
|
|
3527
|
+
position: { type: "object", description: "World position { x, y, z }", properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } } },
|
|
3528
|
+
parent: { type: "string", description: "Parent GameObject path" },
|
|
3529
|
+
duration: { type: "number", description: "Effect duration in seconds" },
|
|
3530
|
+
loop: { type: "boolean", description: "Whether the system loops" },
|
|
3531
|
+
startLifetime: { type: "number", description: "Particle lifetime in seconds" },
|
|
3532
|
+
startSpeed: { type: "number", description: "Initial particle speed" },
|
|
3533
|
+
startSize: { type: "number", description: "Initial particle size" },
|
|
3534
|
+
maxParticles: { type: "number", description: "Maximum number of particles" },
|
|
3535
|
+
gravityModifier: { type: "number", description: "Gravity multiplier" },
|
|
3536
|
+
},
|
|
3537
|
+
},
|
|
3538
|
+
handler: async (params) => JSON.stringify(await bridge.createParticleSystem(params), null, 2),
|
|
3539
|
+
},
|
|
3540
|
+
{
|
|
3541
|
+
name: "unity_particle_info",
|
|
3542
|
+
description: "Get detailed Particle System info: main module, emission, shape, and all module enable states.",
|
|
3543
|
+
inputSchema: {
|
|
3544
|
+
type: "object",
|
|
3545
|
+
properties: {
|
|
3546
|
+
path: { type: "string", description: "GameObject path" },
|
|
3547
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
3548
|
+
},
|
|
3549
|
+
},
|
|
3550
|
+
handler: async (params) => JSON.stringify(await bridge.getParticleSystemInfo(params), null, 2),
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
name: "unity_particle_set_main",
|
|
3554
|
+
description: "Configure the main module of a Particle System: duration, lifetime, speed, size, gravity, simulation space.",
|
|
3555
|
+
inputSchema: {
|
|
3556
|
+
type: "object",
|
|
3557
|
+
properties: {
|
|
3558
|
+
path: { type: "string", description: "GameObject path" },
|
|
3559
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
3560
|
+
duration: { type: "number" }, loop: { type: "boolean" },
|
|
3561
|
+
startLifetime: { type: "number" }, startSpeed: { type: "number" },
|
|
3562
|
+
startSize: { type: "number" }, startRotation: { type: "number" },
|
|
3563
|
+
maxParticles: { type: "number" }, gravityModifier: { type: "number" },
|
|
3564
|
+
playOnAwake: { type: "boolean" },
|
|
3565
|
+
simulationSpace: { type: "string", description: "Local, World, or Custom" },
|
|
3566
|
+
},
|
|
3567
|
+
},
|
|
3568
|
+
handler: async (params) => JSON.stringify(await bridge.setParticleMainModule(params), null, 2),
|
|
3569
|
+
},
|
|
3570
|
+
{
|
|
3571
|
+
name: "unity_particle_set_emission",
|
|
3572
|
+
description: "Configure particle emission: rate over time, rate over distance.",
|
|
3573
|
+
inputSchema: {
|
|
3574
|
+
type: "object",
|
|
3575
|
+
properties: {
|
|
3576
|
+
path: { type: "string", description: "GameObject path" },
|
|
3577
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
3578
|
+
enabled: { type: "boolean" },
|
|
3579
|
+
rateOverTime: { type: "number", description: "Particles emitted per second" },
|
|
3580
|
+
rateOverDistance: { type: "number", description: "Particles emitted per unit distance" },
|
|
3581
|
+
},
|
|
3582
|
+
},
|
|
3583
|
+
handler: async (params) => JSON.stringify(await bridge.setParticleEmission(params), null, 2),
|
|
3584
|
+
},
|
|
3585
|
+
{
|
|
3586
|
+
name: "unity_particle_set_shape",
|
|
3587
|
+
description: "Configure the emission shape: Sphere, Hemisphere, Cone, Box, Circle, Edge, etc.",
|
|
3588
|
+
inputSchema: {
|
|
3589
|
+
type: "object",
|
|
3590
|
+
properties: {
|
|
3591
|
+
path: { type: "string", description: "GameObject path" },
|
|
3592
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
3593
|
+
enabled: { type: "boolean" },
|
|
3594
|
+
shapeType: { type: "string", description: "Shape type: Sphere, Hemisphere, Cone, Box, Circle, Edge, Rectangle, etc." },
|
|
3595
|
+
radius: { type: "number" }, angle: { type: "number" },
|
|
3596
|
+
arc: { type: "number" }, radiusThickness: { type: "number", description: "0 = emit from surface only, 1 = emit from entire volume" },
|
|
3597
|
+
},
|
|
3598
|
+
},
|
|
3599
|
+
handler: async (params) => JSON.stringify(await bridge.setParticleShape(params), null, 2),
|
|
3600
|
+
},
|
|
3601
|
+
{
|
|
3602
|
+
name: "unity_particle_playback",
|
|
3603
|
+
description: "Control particle system playback: play, stop, pause, restart, or clear.",
|
|
3604
|
+
inputSchema: {
|
|
3605
|
+
type: "object",
|
|
3606
|
+
properties: {
|
|
3607
|
+
path: { type: "string", description: "GameObject path" },
|
|
3608
|
+
instanceId: { type: "string", description: "Instance ID (alternative)" },
|
|
3609
|
+
action: { type: "string", description: "play, stop, pause, restart, or clear" },
|
|
3610
|
+
},
|
|
3611
|
+
required: ["action"],
|
|
3612
|
+
},
|
|
3613
|
+
handler: async (params) => JSON.stringify(await bridge.particlePlayback(params), null, 2),
|
|
3614
|
+
},
|
|
3615
|
+
|
|
3616
|
+
// ─── ScriptableObject ───
|
|
3617
|
+
{
|
|
3618
|
+
name: "unity_scriptableobject_create",
|
|
3619
|
+
description: "Create a new ScriptableObject asset from a C# type. The type must already exist as a compiled script.",
|
|
3620
|
+
inputSchema: {
|
|
3621
|
+
type: "object",
|
|
3622
|
+
properties: {
|
|
3623
|
+
type: { type: "string", description: "Full type name (e.g. 'GameSettings', 'MyNamespace.PlayerData')" },
|
|
3624
|
+
path: { type: "string", description: "Asset path (default: Assets/TypeName.asset)" },
|
|
3625
|
+
},
|
|
3626
|
+
required: ["type"],
|
|
3627
|
+
},
|
|
3628
|
+
handler: async (params) => JSON.stringify(await bridge.createScriptableObject(params), null, 2),
|
|
3629
|
+
},
|
|
3630
|
+
{
|
|
3631
|
+
name: "unity_scriptableobject_info",
|
|
3632
|
+
description: "Get all serialized properties and values of a ScriptableObject asset.",
|
|
3633
|
+
inputSchema: {
|
|
3634
|
+
type: "object",
|
|
3635
|
+
properties: {
|
|
3636
|
+
path: { type: "string", description: "Asset path of the ScriptableObject" },
|
|
3637
|
+
},
|
|
3638
|
+
required: ["path"],
|
|
3639
|
+
},
|
|
3640
|
+
handler: async (params) => JSON.stringify(await bridge.getScriptableObjectInfo(params), null, 2),
|
|
3641
|
+
},
|
|
3642
|
+
{
|
|
3643
|
+
name: "unity_scriptableobject_set_field",
|
|
3644
|
+
description: "Set a field value on a ScriptableObject asset. Supports int, float, bool, string, and enum types.",
|
|
3645
|
+
inputSchema: {
|
|
3646
|
+
type: "object",
|
|
3647
|
+
properties: {
|
|
3648
|
+
path: { type: "string", description: "Asset path of the ScriptableObject" },
|
|
3649
|
+
field: { type: "string", description: "Property/field name" },
|
|
3650
|
+
value: { description: "Value to set (type depends on field)" },
|
|
3651
|
+
},
|
|
3652
|
+
required: ["path", "field", "value"],
|
|
3653
|
+
},
|
|
3654
|
+
handler: async (params) => JSON.stringify(await bridge.setScriptableObjectField(params), null, 2),
|
|
3655
|
+
},
|
|
3656
|
+
{
|
|
3657
|
+
name: "unity_scriptableobject_list_types",
|
|
3658
|
+
description: "List all available ScriptableObject types in the project. Useful for discovering what SO types can be created.",
|
|
3659
|
+
inputSchema: {
|
|
3660
|
+
type: "object",
|
|
3661
|
+
properties: {
|
|
3662
|
+
filter: { type: "string", description: "Filter by type name (optional)" },
|
|
3663
|
+
includeEngine: { type: "boolean", description: "Include Unity engine types (default: false, project types only)" },
|
|
3664
|
+
},
|
|
3665
|
+
},
|
|
3666
|
+
handler: async (params) => JSON.stringify(await bridge.listScriptableObjectTypes(params), null, 2),
|
|
3667
|
+
},
|
|
3668
|
+
|
|
3669
|
+
// ─── Texture ───
|
|
3670
|
+
{
|
|
3671
|
+
name: "unity_texture_info",
|
|
3672
|
+
description: "Get texture info and import settings: size, format, compression, sprite mode, filter, wrap, mip maps, etc.",
|
|
3673
|
+
inputSchema: {
|
|
3674
|
+
type: "object",
|
|
3675
|
+
properties: {
|
|
3676
|
+
path: { type: "string", description: "Asset path of the texture" },
|
|
3677
|
+
},
|
|
3678
|
+
required: ["path"],
|
|
3679
|
+
},
|
|
3680
|
+
handler: async (params) => JSON.stringify(await bridge.getTextureInfo(params), null, 2),
|
|
3681
|
+
},
|
|
3682
|
+
{
|
|
3683
|
+
name: "unity_texture_set_import",
|
|
3684
|
+
description: "Set texture import settings: type, compression, max size, filter mode, wrap mode, mipmaps, etc.",
|
|
3685
|
+
inputSchema: {
|
|
3686
|
+
type: "object",
|
|
3687
|
+
properties: {
|
|
3688
|
+
path: { type: "string", description: "Asset path of the texture" },
|
|
3689
|
+
textureType: { type: "string", description: "Default, NormalMap, Sprite, Cursor, Cookie, Lightmap, SingleChannel" },
|
|
3690
|
+
sRGB: { type: "boolean", description: "sRGB color space" },
|
|
3691
|
+
readable: { type: "boolean", description: "Read/Write enabled (uses more memory)" },
|
|
3692
|
+
mipmapEnabled: { type: "boolean", description: "Generate mipmaps" },
|
|
3693
|
+
filterMode: { type: "string", description: "Point, Bilinear, or Trilinear" },
|
|
3694
|
+
wrapMode: { type: "string", description: "Repeat, Clamp, Mirror, MirrorOnce" },
|
|
3695
|
+
maxTextureSize: { type: "number", description: "Max texture size (32, 64, 128, 256, 512, 1024, 2048, 4096, 8192)" },
|
|
3696
|
+
textureCompression: { type: "string", description: "Uncompressed, Compressed, CompressedHQ, CompressedLQ" },
|
|
3697
|
+
anisoLevel: { type: "number", description: "Anisotropic filtering level (0-16)" },
|
|
3698
|
+
alphaIsTransparency: { type: "boolean", description: "Alpha is transparency" },
|
|
3699
|
+
spritePixelsPerUnit: { type: "number", description: "Pixels per unit for sprites" },
|
|
3700
|
+
spriteMode: { type: "string", description: "Single, Multiple, Polygon (for sprite textures)" },
|
|
3701
|
+
npotScale: { type: "string", description: "Non-power-of-2 handling: None, ToNearest, ToLarger, ToSmaller" },
|
|
3702
|
+
},
|
|
3703
|
+
required: ["path"],
|
|
3704
|
+
},
|
|
3705
|
+
handler: async (params) => JSON.stringify(await bridge.setTextureImportSettings(params), null, 2),
|
|
3706
|
+
},
|
|
3707
|
+
{
|
|
3708
|
+
name: "unity_texture_reimport",
|
|
3709
|
+
description: "Force reimport a texture to apply pending changes.",
|
|
3710
|
+
inputSchema: {
|
|
3711
|
+
type: "object",
|
|
3712
|
+
properties: {
|
|
3713
|
+
path: { type: "string", description: "Asset path of the texture" },
|
|
3714
|
+
},
|
|
3715
|
+
required: ["path"],
|
|
3716
|
+
},
|
|
3717
|
+
handler: async (params) => JSON.stringify(await bridge.reimportTexture(params), null, 2),
|
|
3718
|
+
},
|
|
3719
|
+
{
|
|
3720
|
+
name: "unity_texture_set_sprite",
|
|
3721
|
+
description: "Quick-set a texture as a Sprite with optional pixels-per-unit and single/multiple mode.",
|
|
3722
|
+
inputSchema: {
|
|
3723
|
+
type: "object",
|
|
3724
|
+
properties: {
|
|
3725
|
+
path: { type: "string", description: "Asset path of the texture" },
|
|
3726
|
+
pixelsPerUnit: { type: "number", description: "Pixels per unit (default: 100)" },
|
|
3727
|
+
multiple: { type: "boolean", description: "Use Multiple sprite mode for spritesheets (default: false = Single)" },
|
|
3728
|
+
},
|
|
3729
|
+
required: ["path"],
|
|
3730
|
+
},
|
|
3731
|
+
handler: async (params) => JSON.stringify(await bridge.setTextureAsSprite(params), null, 2),
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
name: "unity_texture_set_normalmap",
|
|
3735
|
+
description: "Quick-set a texture as a Normal Map.",
|
|
3736
|
+
inputSchema: {
|
|
3737
|
+
type: "object",
|
|
3738
|
+
properties: {
|
|
3739
|
+
path: { type: "string", description: "Asset path of the texture" },
|
|
3740
|
+
},
|
|
3741
|
+
required: ["path"],
|
|
3742
|
+
},
|
|
3743
|
+
handler: async (params) => JSON.stringify(await bridge.setTextureAsNormalMap(params), null, 2),
|
|
3744
|
+
},
|
|
3745
|
+
|
|
3746
|
+
// ─── Navigation ───
|
|
3747
|
+
|
|
3748
|
+
{
|
|
3749
|
+
name: "unity_navmesh_bake",
|
|
3750
|
+
description: "Bake the NavMesh for AI navigation. Optionally configure agent radius, height, slope, and climb.",
|
|
3751
|
+
inputSchema: {
|
|
3752
|
+
type: "object",
|
|
3753
|
+
properties: {
|
|
3754
|
+
agentRadius: { type: "number", description: "Agent radius (default: from NavMesh settings)" },
|
|
3755
|
+
agentHeight: { type: "number", description: "Agent height" },
|
|
3756
|
+
agentSlope: { type: "number", description: "Max slope angle in degrees" },
|
|
3757
|
+
agentClimb: { type: "number", description: "Step height the agent can climb" },
|
|
3758
|
+
},
|
|
3759
|
+
},
|
|
3760
|
+
handler: async (params) => JSON.stringify(await bridge.bakeNavMesh(params), null, 2),
|
|
3761
|
+
},
|
|
3762
|
+
{
|
|
3763
|
+
name: "unity_navmesh_clear",
|
|
3764
|
+
description: "Clear all baked NavMeshes from the scene.",
|
|
3765
|
+
inputSchema: { type: "object", properties: {} },
|
|
3766
|
+
handler: async (params) => JSON.stringify(await bridge.clearNavMesh(params), null, 2),
|
|
3767
|
+
},
|
|
3768
|
+
{
|
|
3769
|
+
name: "unity_navmesh_add_agent",
|
|
3770
|
+
description: "Add a NavMeshAgent component to a GameObject with optional settings (speed, angular speed, acceleration, stopping distance, radius, height).",
|
|
3771
|
+
inputSchema: {
|
|
3772
|
+
type: "object",
|
|
3773
|
+
properties: {
|
|
3774
|
+
path: { type: "string", description: "GameObject path or name" },
|
|
3775
|
+
speed: { type: "number", description: "Movement speed" },
|
|
3776
|
+
angularSpeed: { type: "number", description: "Turning speed in deg/s" },
|
|
3777
|
+
acceleration: { type: "number", description: "Acceleration" },
|
|
3778
|
+
stoppingDistance: { type: "number", description: "Distance to stop before target" },
|
|
3779
|
+
radius: { type: "number", description: "Agent radius" },
|
|
3780
|
+
height: { type: "number", description: "Agent height" },
|
|
3781
|
+
},
|
|
3782
|
+
required: ["path"],
|
|
3783
|
+
},
|
|
3784
|
+
handler: async (params) => JSON.stringify(await bridge.addNavMeshAgent(params), null, 2),
|
|
3785
|
+
},
|
|
3786
|
+
{
|
|
3787
|
+
name: "unity_navmesh_add_obstacle",
|
|
3788
|
+
description: "Add a NavMeshObstacle component to a GameObject.",
|
|
3789
|
+
inputSchema: {
|
|
3790
|
+
type: "object",
|
|
3791
|
+
properties: {
|
|
3792
|
+
path: { type: "string", description: "GameObject path or name" },
|
|
3793
|
+
carve: { type: "boolean", description: "Whether the obstacle carves the NavMesh" },
|
|
3794
|
+
shape: { type: "string", description: "Shape: 'box' or 'capsule'" },
|
|
3795
|
+
},
|
|
3796
|
+
required: ["path"],
|
|
3797
|
+
},
|
|
3798
|
+
handler: async (params) => JSON.stringify(await bridge.addNavMeshObstacle(params), null, 2),
|
|
3799
|
+
},
|
|
3800
|
+
{
|
|
3801
|
+
name: "unity_navmesh_info",
|
|
3802
|
+
description: "Get NavMesh information: vertex/triangle count, agents, obstacles, agent types.",
|
|
3803
|
+
inputSchema: { type: "object", properties: {} },
|
|
3804
|
+
handler: async (params) => JSON.stringify(await bridge.getNavMeshInfo(params), null, 2),
|
|
3805
|
+
},
|
|
3806
|
+
{
|
|
3807
|
+
name: "unity_navmesh_set_destination",
|
|
3808
|
+
description: "Set the destination for a NavMeshAgent (requires Play mode).",
|
|
3809
|
+
inputSchema: {
|
|
3810
|
+
type: "object",
|
|
3811
|
+
properties: {
|
|
3812
|
+
path: { type: "string", description: "GameObject path with NavMeshAgent" },
|
|
3813
|
+
destination: {
|
|
3814
|
+
type: "object",
|
|
3815
|
+
description: "Target position {x, y, z}",
|
|
3816
|
+
properties: { x: { type: "number" }, y: { type: "number" }, z: { type: "number" } },
|
|
3817
|
+
},
|
|
3818
|
+
},
|
|
3819
|
+
required: ["path", "destination"],
|
|
3820
|
+
},
|
|
3821
|
+
handler: async (params) => JSON.stringify(await bridge.setAgentDestination(params), null, 2),
|
|
3822
|
+
},
|
|
3823
|
+
|
|
3824
|
+
// ─── UI ───
|
|
3825
|
+
|
|
3826
|
+
{
|
|
3827
|
+
name: "unity_ui_create_canvas",
|
|
3828
|
+
description: "Create a UI Canvas with an EventSystem. Render modes: 'overlay', 'camera', 'world'.",
|
|
3829
|
+
inputSchema: {
|
|
3830
|
+
type: "object",
|
|
3831
|
+
properties: {
|
|
3832
|
+
name: { type: "string", description: "Canvas name (default: 'Canvas')" },
|
|
3833
|
+
renderMode: { type: "string", description: "Render mode: overlay, camera, or world" },
|
|
3834
|
+
},
|
|
3835
|
+
},
|
|
3836
|
+
handler: async (params) => JSON.stringify(await bridge.createCanvas(params), null, 2),
|
|
3837
|
+
},
|
|
3838
|
+
{
|
|
3839
|
+
name: "unity_ui_create_element",
|
|
3840
|
+
description: "Create a UI element: text, image, button, panel, slider, toggle, or inputfield.",
|
|
3841
|
+
inputSchema: {
|
|
3842
|
+
type: "object",
|
|
3843
|
+
properties: {
|
|
3844
|
+
type: { type: "string", description: "Element type: text, image, button, panel, slider, toggle, inputfield" },
|
|
3845
|
+
name: { type: "string", description: "Element name" },
|
|
3846
|
+
parent: { type: "string", description: "Parent GameObject path (defaults to first Canvas)" },
|
|
3847
|
+
label: { type: "string", description: "Button label text (for button type)" },
|
|
3848
|
+
anchoredPosition: { type: "object", properties: { x: { type: "number" }, y: { type: "number" } } },
|
|
3849
|
+
sizeDelta: { type: "object", properties: { x: { type: "number" }, y: { type: "number" } } },
|
|
3850
|
+
},
|
|
3851
|
+
required: ["type"],
|
|
3852
|
+
},
|
|
3853
|
+
handler: async (params) => JSON.stringify(await bridge.createUIElement(params), null, 2),
|
|
3854
|
+
},
|
|
3855
|
+
{
|
|
3856
|
+
name: "unity_ui_info",
|
|
3857
|
+
description: "Get UI information: canvases, text/image/button counts.",
|
|
3858
|
+
inputSchema: { type: "object", properties: {} },
|
|
3859
|
+
handler: async (params) => JSON.stringify(await bridge.getUIInfo(params), null, 2),
|
|
3860
|
+
},
|
|
3861
|
+
{
|
|
3862
|
+
name: "unity_ui_set_text",
|
|
3863
|
+
description: "Set properties on a UI Text component (text content, fontSize, color, alignment).",
|
|
3864
|
+
inputSchema: {
|
|
3865
|
+
type: "object",
|
|
3866
|
+
properties: {
|
|
3867
|
+
path: { type: "string", description: "GameObject path with Text component" },
|
|
3868
|
+
text: { type: "string", description: "Text content" },
|
|
3869
|
+
fontSize: { type: "number", description: "Font size" },
|
|
3870
|
+
color: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } } },
|
|
3871
|
+
alignment: { type: "string", description: "Text alignment (e.g. MiddleCenter, UpperLeft)" },
|
|
3872
|
+
},
|
|
3873
|
+
required: ["path"],
|
|
3874
|
+
},
|
|
3875
|
+
handler: async (params) => JSON.stringify(await bridge.setUIText(params), null, 2),
|
|
3876
|
+
},
|
|
3877
|
+
{
|
|
3878
|
+
name: "unity_ui_set_image",
|
|
3879
|
+
description: "Set properties on a UI Image component (color, sprite, imageType, raycastTarget).",
|
|
3880
|
+
inputSchema: {
|
|
3881
|
+
type: "object",
|
|
3882
|
+
properties: {
|
|
3883
|
+
path: { type: "string", description: "GameObject path with Image component" },
|
|
3884
|
+
color: { type: "object", properties: { r: { type: "number" }, g: { type: "number" }, b: { type: "number" }, a: { type: "number" } } },
|
|
3885
|
+
sprite: { type: "string", description: "Asset path to sprite" },
|
|
3886
|
+
imageType: { type: "string", description: "Image type: simple, sliced, tiled, filled" },
|
|
3887
|
+
raycastTarget: { type: "boolean", description: "Whether image blocks raycasts" },
|
|
3888
|
+
},
|
|
3889
|
+
required: ["path"],
|
|
3890
|
+
},
|
|
3891
|
+
handler: async (params) => JSON.stringify(await bridge.setUIImage(params), null, 2),
|
|
3892
|
+
},
|
|
3893
|
+
|
|
3894
|
+
// ─── Package Manager ───
|
|
3895
|
+
|
|
3896
|
+
{
|
|
3897
|
+
name: "unity_packages_list",
|
|
3898
|
+
description: "List all installed Unity packages with their name, version, source, and status.",
|
|
3899
|
+
inputSchema: { type: "object", properties: {} },
|
|
3900
|
+
handler: async (params) => JSON.stringify(await bridge.listPackages(params), null, 2),
|
|
3901
|
+
},
|
|
3902
|
+
{
|
|
3903
|
+
name: "unity_packages_add",
|
|
3904
|
+
description: "Add/install a Unity package by identifier (e.g. 'com.unity.cinemachine' or 'com.unity.cinemachine@3.0.0').",
|
|
3905
|
+
inputSchema: {
|
|
3906
|
+
type: "object",
|
|
3907
|
+
properties: {
|
|
3908
|
+
identifier: { type: "string", description: "Package identifier, e.g. 'com.unity.cinemachine@3.0.0'" },
|
|
3909
|
+
},
|
|
3910
|
+
required: ["identifier"],
|
|
3911
|
+
},
|
|
3912
|
+
handler: async (params) => JSON.stringify(await bridge.addPackage(params), null, 2),
|
|
3913
|
+
},
|
|
3914
|
+
{
|
|
3915
|
+
name: "unity_packages_remove",
|
|
3916
|
+
description: "Remove/uninstall a Unity package by name.",
|
|
3917
|
+
inputSchema: {
|
|
3918
|
+
type: "object",
|
|
3919
|
+
properties: {
|
|
3920
|
+
name: { type: "string", description: "Package name, e.g. 'com.unity.cinemachine'" },
|
|
3921
|
+
},
|
|
3922
|
+
required: ["name"],
|
|
3923
|
+
},
|
|
3924
|
+
handler: async (params) => JSON.stringify(await bridge.removePackage(params), null, 2),
|
|
3925
|
+
},
|
|
3926
|
+
{
|
|
3927
|
+
name: "unity_packages_search",
|
|
3928
|
+
description: "Search for Unity packages in the registry.",
|
|
3929
|
+
inputSchema: {
|
|
3930
|
+
type: "object",
|
|
3931
|
+
properties: {
|
|
3932
|
+
query: { type: "string", description: "Search query" },
|
|
3933
|
+
},
|
|
3934
|
+
required: ["query"],
|
|
3935
|
+
},
|
|
3936
|
+
handler: async (params) => JSON.stringify(await bridge.searchPackage(params), null, 2),
|
|
3937
|
+
},
|
|
3938
|
+
{
|
|
3939
|
+
name: "unity_packages_info",
|
|
3940
|
+
description: "Get detailed info about an installed package including versions and dependencies.",
|
|
3941
|
+
inputSchema: {
|
|
3942
|
+
type: "object",
|
|
3943
|
+
properties: {
|
|
3944
|
+
name: { type: "string", description: "Package name, e.g. 'com.unity.cinemachine'" },
|
|
3945
|
+
},
|
|
3946
|
+
required: ["name"],
|
|
3947
|
+
},
|
|
3948
|
+
handler: async (params) => JSON.stringify(await bridge.getPackageInfo(params), null, 2),
|
|
3949
|
+
},
|
|
3950
|
+
|
|
3951
|
+
// ─── Constraints & LOD ───
|
|
3952
|
+
|
|
3953
|
+
{
|
|
3954
|
+
name: "unity_constraint_add",
|
|
3955
|
+
description: "Add an animation constraint (position, rotation, scale, aim, parent, lookat) to a GameObject with optional source.",
|
|
3956
|
+
inputSchema: {
|
|
3957
|
+
type: "object",
|
|
3958
|
+
properties: {
|
|
3959
|
+
path: { type: "string", description: "Target GameObject path" },
|
|
3960
|
+
type: { type: "string", description: "Constraint type: position, rotation, scale, aim, parent, lookat" },
|
|
3961
|
+
source: { type: "string", description: "Source GameObject path" },
|
|
3962
|
+
activate: { type: "boolean", description: "Activate the constraint immediately" },
|
|
3963
|
+
},
|
|
3964
|
+
required: ["path", "type"],
|
|
3965
|
+
},
|
|
3966
|
+
handler: async (params) => JSON.stringify(await bridge.addConstraint(params), null, 2),
|
|
3967
|
+
},
|
|
3968
|
+
{
|
|
3969
|
+
name: "unity_constraint_info",
|
|
3970
|
+
description: "Get all constraints on a GameObject with their type, active state, weight, and source count.",
|
|
3971
|
+
inputSchema: {
|
|
3972
|
+
type: "object",
|
|
3973
|
+
properties: {
|
|
3974
|
+
path: { type: "string", description: "GameObject path" },
|
|
3975
|
+
},
|
|
3976
|
+
required: ["path"],
|
|
3977
|
+
},
|
|
3978
|
+
handler: async (params) => JSON.stringify(await bridge.getConstraintInfo(params), null, 2),
|
|
3979
|
+
},
|
|
3980
|
+
{
|
|
3981
|
+
name: "unity_lod_create",
|
|
3982
|
+
description: "Create or configure a LODGroup on a GameObject with specified number of LOD levels.",
|
|
3983
|
+
inputSchema: {
|
|
3984
|
+
type: "object",
|
|
3985
|
+
properties: {
|
|
3986
|
+
path: { type: "string", description: "GameObject path" },
|
|
3987
|
+
levels: { type: "number", description: "Number of LOD levels (1-8, default: 3)" },
|
|
3988
|
+
},
|
|
3989
|
+
required: ["path"],
|
|
3990
|
+
},
|
|
3991
|
+
handler: async (params) => JSON.stringify(await bridge.createLODGroup(params), null, 2),
|
|
3992
|
+
},
|
|
3993
|
+
{
|
|
3994
|
+
name: "unity_lod_info",
|
|
3995
|
+
description: "Get LODGroup info: LOD levels, screen transition heights, renderer counts.",
|
|
3996
|
+
inputSchema: {
|
|
3997
|
+
type: "object",
|
|
3998
|
+
properties: {
|
|
3999
|
+
path: { type: "string", description: "GameObject path with LODGroup" },
|
|
4000
|
+
},
|
|
4001
|
+
required: ["path"],
|
|
4002
|
+
},
|
|
4003
|
+
handler: async (params) => JSON.stringify(await bridge.getLODGroupInfo(params), null, 2),
|
|
4004
|
+
},
|
|
4005
|
+
|
|
4006
|
+
// ─── Prefs ───
|
|
4007
|
+
|
|
4008
|
+
{
|
|
4009
|
+
name: "unity_editorprefs_get",
|
|
4010
|
+
description: "Get an EditorPrefs value by key. Specify type: string (default), int, float, bool.",
|
|
4011
|
+
inputSchema: {
|
|
4012
|
+
type: "object",
|
|
4013
|
+
properties: {
|
|
4014
|
+
key: { type: "string", description: "Preference key" },
|
|
4015
|
+
type: { type: "string", description: "Value type: string, int, float, bool" },
|
|
4016
|
+
},
|
|
4017
|
+
required: ["key"],
|
|
4018
|
+
},
|
|
4019
|
+
handler: async (params) => JSON.stringify(await bridge.getEditorPref(params), null, 2),
|
|
4020
|
+
},
|
|
4021
|
+
{
|
|
4022
|
+
name: "unity_editorprefs_set",
|
|
4023
|
+
description: "Set an EditorPrefs value. Specify type: string (default), int, float, bool.",
|
|
4024
|
+
inputSchema: {
|
|
4025
|
+
type: "object",
|
|
4026
|
+
properties: {
|
|
4027
|
+
key: { type: "string", description: "Preference key" },
|
|
4028
|
+
value: { description: "Value to set" },
|
|
4029
|
+
type: { type: "string", description: "Value type: string, int, float, bool" },
|
|
4030
|
+
},
|
|
4031
|
+
required: ["key", "value"],
|
|
4032
|
+
},
|
|
4033
|
+
handler: async (params) => JSON.stringify(await bridge.setEditorPref(params), null, 2),
|
|
4034
|
+
},
|
|
4035
|
+
{
|
|
4036
|
+
name: "unity_editorprefs_delete",
|
|
4037
|
+
description: "Delete an EditorPrefs key.",
|
|
4038
|
+
inputSchema: {
|
|
4039
|
+
type: "object",
|
|
4040
|
+
properties: {
|
|
4041
|
+
key: { type: "string", description: "Preference key to delete" },
|
|
4042
|
+
},
|
|
4043
|
+
required: ["key"],
|
|
4044
|
+
},
|
|
4045
|
+
handler: async (params) => JSON.stringify(await bridge.deleteEditorPref(params), null, 2),
|
|
4046
|
+
},
|
|
4047
|
+
{
|
|
4048
|
+
name: "unity_playerprefs_get",
|
|
4049
|
+
description: "Get a PlayerPrefs value by key. Specify type: string (default), int, float.",
|
|
4050
|
+
inputSchema: {
|
|
4051
|
+
type: "object",
|
|
4052
|
+
properties: {
|
|
4053
|
+
key: { type: "string", description: "Preference key" },
|
|
4054
|
+
type: { type: "string", description: "Value type: string, int, float" },
|
|
4055
|
+
},
|
|
4056
|
+
required: ["key"],
|
|
4057
|
+
},
|
|
4058
|
+
handler: async (params) => JSON.stringify(await bridge.getPlayerPref(params), null, 2),
|
|
4059
|
+
},
|
|
4060
|
+
{
|
|
4061
|
+
name: "unity_playerprefs_set",
|
|
4062
|
+
description: "Set a PlayerPrefs value. Specify type: string (default), int, float.",
|
|
4063
|
+
inputSchema: {
|
|
4064
|
+
type: "object",
|
|
4065
|
+
properties: {
|
|
4066
|
+
key: { type: "string", description: "Preference key" },
|
|
4067
|
+
value: { description: "Value to set" },
|
|
4068
|
+
type: { type: "string", description: "Value type: string, int, float" },
|
|
4069
|
+
},
|
|
4070
|
+
required: ["key", "value"],
|
|
4071
|
+
},
|
|
4072
|
+
handler: async (params) => JSON.stringify(await bridge.setPlayerPref(params), null, 2),
|
|
4073
|
+
},
|
|
4074
|
+
{
|
|
4075
|
+
name: "unity_playerprefs_delete",
|
|
4076
|
+
description: "Delete a PlayerPrefs key.",
|
|
4077
|
+
inputSchema: {
|
|
4078
|
+
type: "object",
|
|
4079
|
+
properties: {
|
|
4080
|
+
key: { type: "string", description: "Preference key to delete" },
|
|
4081
|
+
},
|
|
4082
|
+
required: ["key"],
|
|
4083
|
+
},
|
|
4084
|
+
handler: async (params) => JSON.stringify(await bridge.deletePlayerPref(params), null, 2),
|
|
4085
|
+
},
|
|
4086
|
+
{
|
|
4087
|
+
name: "unity_playerprefs_delete_all",
|
|
4088
|
+
description: "Delete ALL PlayerPrefs. Use with caution.",
|
|
4089
|
+
inputSchema: { type: "object", properties: {} },
|
|
4090
|
+
handler: async (params) => JSON.stringify(await bridge.deleteAllPlayerPrefs(params), null, 2),
|
|
4091
|
+
},
|
|
4092
|
+
|
|
4093
|
+
// ─── Queue Management (Multi-Agent) ───
|
|
4094
|
+
{
|
|
4095
|
+
name: "unity_queue_info",
|
|
4096
|
+
description:
|
|
4097
|
+
"Get the current state of the multi-agent request queue: total queued requests, active agents, per-agent queue depths, and completed cache size. Useful for monitoring when multiple agents are working on the same Unity project.",
|
|
4098
|
+
inputSchema: { type: "object", properties: {} },
|
|
4099
|
+
handler: async () => JSON.stringify(await bridge.getQueueInfo(), null, 2),
|
|
4100
|
+
},
|
|
4101
|
+
{
|
|
4102
|
+
name: "unity_queue_ticket_status",
|
|
4103
|
+
description:
|
|
4104
|
+
"Check the status of a specific queue ticket by ID. Returns the ticket's current status (Queued, Executing, Completed, Failed, TimedOut), result data if completed, and timing information.",
|
|
4105
|
+
inputSchema: {
|
|
4106
|
+
type: "object",
|
|
4107
|
+
properties: {
|
|
4108
|
+
ticketId: {
|
|
4109
|
+
type: "number",
|
|
4110
|
+
description: "The ticket ID returned from a queue submission",
|
|
4111
|
+
},
|
|
4112
|
+
},
|
|
4113
|
+
required: ["ticketId"],
|
|
4114
|
+
},
|
|
4115
|
+
handler: async ({ ticketId }) =>
|
|
4116
|
+
JSON.stringify(await bridge.getTicketStatus(ticketId), null, 2),
|
|
4117
|
+
},
|
|
4118
|
+
{
|
|
4119
|
+
name: "unity_agents_list",
|
|
4120
|
+
description:
|
|
4121
|
+
"List all active agent sessions connected to the AB Unity MCP bridge. Shows each agent's ID, connection time, last activity, current action, total actions count, queued/completed request counts, and average response time.",
|
|
4122
|
+
inputSchema: { type: "object", properties: {} },
|
|
4123
|
+
handler: async () => JSON.stringify(await bridge.listAgents(), null, 2),
|
|
4124
|
+
},
|
|
4125
|
+
{
|
|
4126
|
+
name: "unity_agent_log",
|
|
4127
|
+
description:
|
|
4128
|
+
"Get the action log for a specific agent, showing the last 100 actions with timestamps.",
|
|
4129
|
+
inputSchema: {
|
|
4130
|
+
type: "object",
|
|
4131
|
+
properties: {
|
|
4132
|
+
agentId: {
|
|
4133
|
+
type: "string",
|
|
4134
|
+
description: "The agent ID to get logs for",
|
|
4135
|
+
},
|
|
4136
|
+
},
|
|
4137
|
+
required: ["agentId"],
|
|
4138
|
+
},
|
|
4139
|
+
handler: async (params) =>
|
|
4140
|
+
JSON.stringify(await bridge.getAgentLog(params), null, 2),
|
|
4141
|
+
},
|
|
4142
|
+
|
|
4143
|
+
// ─── MPPM Scenario Management ───
|
|
4144
|
+
// These are NOT in CORE_TOOLS, so they automatically become advanced/lazy-loaded
|
|
4145
|
+
// tools accessible via unity_advanced_tool, keeping the exposed tool count low.
|
|
4146
|
+
{
|
|
4147
|
+
name: "unity_mppm_list_scenarios",
|
|
4148
|
+
description: "List all MPPM (Multiplayer PlayMode) scenarios in the project with details about instances and configurations.",
|
|
4149
|
+
inputSchema: { type: "object", properties: {} },
|
|
4150
|
+
handler: async () => JSON.stringify(await bridge.sendCommand("scenario/list", {}), null, 2),
|
|
4151
|
+
},
|
|
4152
|
+
{
|
|
4153
|
+
name: "unity_mppm_status",
|
|
4154
|
+
description: "Get the current scenario status including running state, active scenario name, and progress.",
|
|
4155
|
+
inputSchema: { type: "object", properties: {} },
|
|
4156
|
+
handler: async () => JSON.stringify(await bridge.sendCommand("scenario/status", {}), null, 2),
|
|
4157
|
+
},
|
|
4158
|
+
{
|
|
4159
|
+
name: "unity_mppm_activate_scenario",
|
|
4160
|
+
description: "Load/activate a specific scenario by its asset path.",
|
|
4161
|
+
inputSchema: {
|
|
4162
|
+
type: "object",
|
|
4163
|
+
properties: {
|
|
4164
|
+
path: { type: "string", description: "Asset path to the scenario (e.g., 'Assets/MPPM/Scenarios/MyScenario.asset')" },
|
|
4165
|
+
},
|
|
4166
|
+
required: ["path"],
|
|
4167
|
+
},
|
|
4168
|
+
handler: async ({ path }) => JSON.stringify(await bridge.sendCommand("scenario/activate", { path }), null, 2),
|
|
4169
|
+
},
|
|
4170
|
+
{
|
|
4171
|
+
name: "unity_mppm_start",
|
|
4172
|
+
description:
|
|
4173
|
+
"Start the currently active scenario. By default also enters Play mode on the main editor " +
|
|
4174
|
+
"so MPPM's Play-mode hooks fire (virtual players launch, scene tick starts). " +
|
|
4175
|
+
"Set enterPlayMode=false to only mark the scenario running without entering Play.",
|
|
4176
|
+
inputSchema: {
|
|
4177
|
+
type: "object",
|
|
4178
|
+
properties: {
|
|
4179
|
+
enterPlayMode: {
|
|
4180
|
+
type: "boolean",
|
|
4181
|
+
description: "Enter Play mode after starting the scenario. Default true.",
|
|
4182
|
+
},
|
|
4183
|
+
},
|
|
4184
|
+
},
|
|
4185
|
+
handler: async (args) =>
|
|
4186
|
+
JSON.stringify(await bridge.sendCommand("scenario/start", args || {}), null, 2),
|
|
4187
|
+
},
|
|
4188
|
+
{
|
|
4189
|
+
name: "unity_mppm_stop",
|
|
4190
|
+
description:
|
|
4191
|
+
"Stop the running scenario. By default also exits Play mode on the main editor so " +
|
|
4192
|
+
"virtual-player processes shut down. Set exitPlayMode=false to leave Play mode running.",
|
|
4193
|
+
inputSchema: {
|
|
4194
|
+
type: "object",
|
|
4195
|
+
properties: {
|
|
4196
|
+
exitPlayMode: {
|
|
4197
|
+
type: "boolean",
|
|
4198
|
+
description: "Exit Play mode after stopping the scenario. Default true.",
|
|
4199
|
+
},
|
|
4200
|
+
},
|
|
4201
|
+
},
|
|
4202
|
+
handler: async (args) =>
|
|
4203
|
+
JSON.stringify(await bridge.sendCommand("scenario/stop", args || {}), null, 2),
|
|
4204
|
+
},
|
|
4205
|
+
{
|
|
4206
|
+
name: "unity_mppm_info",
|
|
4207
|
+
description: "Get multiplayer play mode information including CurrentPlayer state, tags, and MPPM package version.",
|
|
4208
|
+
inputSchema: { type: "object", properties: {} },
|
|
4209
|
+
handler: async () => JSON.stringify(await bridge.sendCommand("scenario/info", {}), null, 2),
|
|
4210
|
+
},
|
|
4211
|
+
{
|
|
4212
|
+
name: "unity_mppm_create_scenario",
|
|
4213
|
+
description:
|
|
4214
|
+
"Create an MPPM ScenarioConfig asset programmatically. Unity 6+ (MPPM 2.0). " +
|
|
4215
|
+
"Produces 1 MainEditor instance + N VirtualEditor instances, saved as a .asset " +
|
|
4216
|
+
"file you can then activate with unity_mppm_activate_scenario and run with unity_mppm_start.",
|
|
4217
|
+
inputSchema: {
|
|
4218
|
+
type: "object",
|
|
4219
|
+
properties: {
|
|
4220
|
+
name: { type: "string", description: "Scenario name (also used as the default asset file name)." },
|
|
4221
|
+
path: { type: "string", description: "Optional asset path. Defaults to 'Assets/MPPM/{name}.asset'." },
|
|
4222
|
+
mainRole: {
|
|
4223
|
+
type: "string",
|
|
4224
|
+
enum: ["Host", "Client", "Server"],
|
|
4225
|
+
description: "Role for the Main Editor instance. 'Host' = ClientAndServer (default).",
|
|
4226
|
+
},
|
|
4227
|
+
virtualEditors: {
|
|
4228
|
+
type: "integer",
|
|
4229
|
+
minimum: 0,
|
|
4230
|
+
description: "Number of Virtual Editor instances (clones) to add. Default 1.",
|
|
4231
|
+
},
|
|
4232
|
+
virtualRole: {
|
|
4233
|
+
type: "string",
|
|
4234
|
+
enum: ["Client", "Server", "Host"],
|
|
4235
|
+
description: "Role for each Virtual Editor instance. Default 'Client'.",
|
|
4236
|
+
},
|
|
4237
|
+
description: { type: "string", description: "Optional human-readable description." },
|
|
4238
|
+
},
|
|
4239
|
+
required: ["name"],
|
|
4240
|
+
},
|
|
4241
|
+
handler: async (args) =>
|
|
4242
|
+
JSON.stringify(await bridge.sendCommand("scenario/create", args || {}), null, 2),
|
|
4243
|
+
},
|
|
4244
|
+
|
|
4245
|
+
// ─── MPPM Virtual Players (direct lifecycle, no scenario asset needed) ───
|
|
4246
|
+
{
|
|
4247
|
+
name: "unity_mppm_list_players",
|
|
4248
|
+
description:
|
|
4249
|
+
"List the 4 MPPM virtual-player slots and their current state " +
|
|
4250
|
+
"(NotLaunched / Launching / Launched / Communicative). Use this before " +
|
|
4251
|
+
"activating a player to verify slot availability.",
|
|
4252
|
+
inputSchema: { type: "object", properties: {} },
|
|
4253
|
+
handler: async () => JSON.stringify(await bridge.sendCommand("mppm/list-players", {}), null, 2),
|
|
4254
|
+
},
|
|
4255
|
+
{
|
|
4256
|
+
name: "unity_mppm_activate_player",
|
|
4257
|
+
description:
|
|
4258
|
+
"Activate a Virtual Player (clone Unity Editor process). index must be 2, 3, or 4 " +
|
|
4259
|
+
"(Player 1 is the main editor). Returns immediately while the player is in 'Launching' " +
|
|
4260
|
+
"state — poll unity_mppm_list_players or unity_list_instances to detect when ready " +
|
|
4261
|
+
"(typically 30-60s on a cold project). Refuses to activate if there are pending compile " +
|
|
4262
|
+
"errors (returns ActivationError=CompileErrors).",
|
|
4263
|
+
inputSchema: {
|
|
4264
|
+
type: "object",
|
|
4265
|
+
properties: {
|
|
4266
|
+
index: { type: "integer", description: "Player slot to activate: 2, 3, or 4.", minimum: 2, maximum: 4 },
|
|
4267
|
+
},
|
|
4268
|
+
required: ["index"],
|
|
4269
|
+
},
|
|
4270
|
+
handler: async ({ index }) => JSON.stringify(await bridge.sendCommand("mppm/activate-player", { index }), null, 2),
|
|
4271
|
+
},
|
|
4272
|
+
{
|
|
4273
|
+
name: "unity_mppm_deactivate_player",
|
|
4274
|
+
description:
|
|
4275
|
+
"Deactivate a Virtual Player previously activated via unity_mppm_activate_player. " +
|
|
4276
|
+
"index must be 2, 3, or 4.",
|
|
4277
|
+
inputSchema: {
|
|
4278
|
+
type: "object",
|
|
4279
|
+
properties: {
|
|
4280
|
+
index: { type: "integer", description: "Player slot to deactivate: 2, 3, or 4.", minimum: 2, maximum: 4 },
|
|
4281
|
+
},
|
|
4282
|
+
required: ["index"],
|
|
4283
|
+
},
|
|
4284
|
+
handler: async ({ index }) => JSON.stringify(await bridge.sendCommand("mppm/deactivate-player", { index }), null, 2),
|
|
4285
|
+
},
|
|
4286
|
+
|
|
4287
|
+
// ─── Testing ───
|
|
4288
|
+
{
|
|
4289
|
+
name: "unity_testing_run_tests",
|
|
4290
|
+
description:
|
|
4291
|
+
"Start a Unity Test Runner test run. Returns a job ID immediately — use unity_testing_get_job to poll for progress and results. " +
|
|
4292
|
+
"Supports EditMode and PlayMode tests with optional filters by test name, category, assembly, or group.",
|
|
4293
|
+
inputSchema: {
|
|
4294
|
+
type: "object",
|
|
4295
|
+
properties: {
|
|
4296
|
+
mode: {
|
|
4297
|
+
type: "string",
|
|
4298
|
+
description: "Test mode: 'EditMode' or 'PlayMode' (default: EditMode)",
|
|
4299
|
+
enum: ["EditMode", "PlayMode"],
|
|
4300
|
+
},
|
|
4301
|
+
testNames: {
|
|
4302
|
+
type: "array",
|
|
4303
|
+
items: { type: "string" },
|
|
4304
|
+
description: "Run only tests matching these full names (e.g. ['MyNamespace.MyTestClass.MyTest'])",
|
|
4305
|
+
},
|
|
4306
|
+
categories: {
|
|
4307
|
+
type: "array",
|
|
4308
|
+
items: { type: "string" },
|
|
4309
|
+
description: "Run only tests in these NUnit categories",
|
|
4310
|
+
},
|
|
4311
|
+
assemblies: {
|
|
4312
|
+
type: "array",
|
|
4313
|
+
items: { type: "string" },
|
|
4314
|
+
description: "Run only tests from these assembly names (e.g. ['Augmentus.Repository.Tests'])",
|
|
4315
|
+
},
|
|
4316
|
+
groupNames: {
|
|
4317
|
+
type: "array",
|
|
4318
|
+
items: { type: "string" },
|
|
4319
|
+
description: "Regex patterns matched against the test fixture's FullName (Unity's Filter.groupNames). Class name like 'MountSmokeTests' runs every method on that class.",
|
|
4320
|
+
},
|
|
4321
|
+
filter: {
|
|
4322
|
+
type: "string",
|
|
4323
|
+
description: "Convenience alias forwarded into Unity's Filter.groupNames as a regex. Pass a class name (e.g. 'MountSmokeTests') or a regex; comma-separated values are split into multiple groupNames entries. Merges with any explicit groupNames array.",
|
|
4324
|
+
},
|
|
4325
|
+
clearStuck: {
|
|
4326
|
+
type: "boolean",
|
|
4327
|
+
description: "Force-clear a stuck test job before starting a new one",
|
|
4328
|
+
},
|
|
4329
|
+
},
|
|
4330
|
+
},
|
|
4331
|
+
handler: async (params) => {
|
|
4332
|
+
const result = await bridge.runTests(params);
|
|
4333
|
+
// If the run started successfully, auto-poll for a few seconds to provide early feedback
|
|
4334
|
+
if (result.jobId && result.status === "running") {
|
|
4335
|
+
// Wait briefly then check for early results
|
|
4336
|
+
await new Promise((r) => setTimeout(r, 2000));
|
|
4337
|
+
try {
|
|
4338
|
+
const status = await bridge.getTestJob({ jobId: result.jobId });
|
|
4339
|
+
return JSON.stringify(status, null, 2);
|
|
4340
|
+
} catch (_) {
|
|
4341
|
+
return JSON.stringify(result, null, 2);
|
|
4342
|
+
}
|
|
4343
|
+
}
|
|
4344
|
+
return JSON.stringify(result, null, 2);
|
|
4345
|
+
},
|
|
4346
|
+
},
|
|
4347
|
+
{
|
|
4348
|
+
name: "unity_testing_get_job",
|
|
4349
|
+
description:
|
|
4350
|
+
"Get the status and results of a test run job. If no jobId is provided, returns the latest job. " +
|
|
4351
|
+
"Poll this after calling unity_testing_run_tests until status is 'succeeded' or 'failed'. " +
|
|
4352
|
+
"Use waitTimeout for server-side polling to avoid repeated calls.",
|
|
4353
|
+
inputSchema: {
|
|
4354
|
+
type: "object",
|
|
4355
|
+
properties: {
|
|
4356
|
+
jobId: {
|
|
4357
|
+
type: "string",
|
|
4358
|
+
description: "The job ID returned by unity_testing_run_tests. Omit to get the latest job.",
|
|
4359
|
+
},
|
|
4360
|
+
includeDetails: {
|
|
4361
|
+
type: "boolean",
|
|
4362
|
+
description: "Include full results for every test (name, status, duration, message, stackTrace)",
|
|
4363
|
+
},
|
|
4364
|
+
includeFailedOnly: {
|
|
4365
|
+
type: "boolean",
|
|
4366
|
+
description: "Include detailed results only for failed/inconclusive tests",
|
|
4367
|
+
},
|
|
4368
|
+
waitTimeout: {
|
|
4369
|
+
type: "number",
|
|
4370
|
+
description:
|
|
4371
|
+
"Server-side wait timeout in seconds. If set, polls Unity every 2s until tests complete or timeout expires. " +
|
|
4372
|
+
"Reduces client-side polling. Recommended: 30-60 seconds.",
|
|
4373
|
+
},
|
|
4374
|
+
},
|
|
4375
|
+
},
|
|
4376
|
+
handler: async (params) => {
|
|
4377
|
+
const waitTimeout = params?.waitTimeout;
|
|
4378
|
+
if (waitTimeout && waitTimeout > 0) {
|
|
4379
|
+
// Server-side polling loop
|
|
4380
|
+
const deadline = Date.now() + waitTimeout * 1000;
|
|
4381
|
+
let lastResult;
|
|
4382
|
+
while (Date.now() < deadline) {
|
|
4383
|
+
lastResult = await bridge.getTestJob(params);
|
|
4384
|
+
const status = lastResult?.status;
|
|
4385
|
+
if (status === "succeeded" || status === "failed") {
|
|
4386
|
+
return JSON.stringify(lastResult, null, 2);
|
|
4387
|
+
}
|
|
4388
|
+
// Wait 2 seconds before next poll
|
|
4389
|
+
await new Promise((r) => setTimeout(r, 2000));
|
|
4390
|
+
}
|
|
4391
|
+
// Timeout — return last known state
|
|
4392
|
+
return JSON.stringify(lastResult || (await bridge.getTestJob(params)), null, 2);
|
|
4393
|
+
}
|
|
4394
|
+
return JSON.stringify(await bridge.getTestJob(params), null, 2);
|
|
4395
|
+
},
|
|
4396
|
+
},
|
|
4397
|
+
{
|
|
4398
|
+
name: "unity_testing_list_tests",
|
|
4399
|
+
description:
|
|
4400
|
+
"List available tests in the Unity project. Returns test names, categories, and run state. " +
|
|
4401
|
+
"Use this to discover what tests exist before running them.",
|
|
4402
|
+
inputSchema: {
|
|
4403
|
+
type: "object",
|
|
4404
|
+
properties: {
|
|
4405
|
+
mode: {
|
|
4406
|
+
type: "string",
|
|
4407
|
+
description: "Test mode: 'EditMode' or 'PlayMode' (default: EditMode)",
|
|
4408
|
+
enum: ["EditMode", "PlayMode"],
|
|
4409
|
+
},
|
|
4410
|
+
nameFilter: {
|
|
4411
|
+
type: "string",
|
|
4412
|
+
description: "Filter tests by name (case-insensitive substring match)",
|
|
4413
|
+
},
|
|
4414
|
+
maxResults: {
|
|
4415
|
+
type: "number",
|
|
4416
|
+
description: "Maximum number of tests to return (default: 200)",
|
|
4417
|
+
},
|
|
4418
|
+
},
|
|
4419
|
+
},
|
|
4420
|
+
handler: async (params) => JSON.stringify(await bridge.listTests(params || {}), null, 2),
|
|
4421
|
+
},
|
|
4422
|
+
|
|
4423
|
+
// ─── Sprite Atlas ───
|
|
4424
|
+
|
|
4425
|
+
{
|
|
4426
|
+
name: "unity_spriteatlas_create",
|
|
4427
|
+
description: "Create a new SpriteAtlas asset at the given path.",
|
|
4428
|
+
inputSchema: {
|
|
4429
|
+
type: "object",
|
|
4430
|
+
properties: {
|
|
4431
|
+
path: { type: "string", description: "Asset path (e.g. 'Assets/Atlases/MyAtlas.spriteatlas')" },
|
|
4432
|
+
includeInBuild: { type: "boolean", description: "Include atlas in builds (default: true)" },
|
|
4433
|
+
},
|
|
4434
|
+
required: ["path"],
|
|
4435
|
+
},
|
|
4436
|
+
handler: async (params) => JSON.stringify(await bridge.createSpriteAtlas(params), null, 2),
|
|
4437
|
+
},
|
|
4438
|
+
{
|
|
4439
|
+
name: "unity_spriteatlas_info",
|
|
4440
|
+
description: "Get SpriteAtlas details: packables, texture settings, packing settings.",
|
|
4441
|
+
inputSchema: {
|
|
4442
|
+
type: "object",
|
|
4443
|
+
properties: {
|
|
4444
|
+
path: { type: "string", description: "Asset path of the SpriteAtlas" },
|
|
4445
|
+
},
|
|
4446
|
+
required: ["path"],
|
|
4447
|
+
},
|
|
4448
|
+
handler: async (params) => JSON.stringify(await bridge.getSpriteAtlasInfo(params), null, 2),
|
|
4449
|
+
},
|
|
4450
|
+
{
|
|
4451
|
+
name: "unity_spriteatlas_add",
|
|
4452
|
+
description: "Add sprites, textures, or folders to a SpriteAtlas.",
|
|
4453
|
+
inputSchema: {
|
|
4454
|
+
type: "object",
|
|
4455
|
+
properties: {
|
|
4456
|
+
path: { type: "string", description: "Asset path of the SpriteAtlas" },
|
|
4457
|
+
assetPaths: { type: "array", items: { type: "string" }, description: "Asset paths to add" },
|
|
4458
|
+
assetPath: { type: "string", description: "Single asset path to add (alternative to assetPaths)" },
|
|
4459
|
+
},
|
|
4460
|
+
required: ["path"],
|
|
4461
|
+
},
|
|
4462
|
+
handler: async (params) => JSON.stringify(await bridge.addToSpriteAtlas(params), null, 2),
|
|
4463
|
+
},
|
|
4464
|
+
{
|
|
4465
|
+
name: "unity_spriteatlas_remove",
|
|
4466
|
+
description: "Remove packables from a SpriteAtlas.",
|
|
4467
|
+
inputSchema: {
|
|
4468
|
+
type: "object",
|
|
4469
|
+
properties: {
|
|
4470
|
+
path: { type: "string", description: "Asset path of the SpriteAtlas" },
|
|
4471
|
+
assetPaths: { type: "array", items: { type: "string" }, description: "Asset paths to remove" },
|
|
4472
|
+
assetPath: { type: "string", description: "Single asset path to remove (alternative to assetPaths)" },
|
|
4473
|
+
},
|
|
4474
|
+
required: ["path"],
|
|
4475
|
+
},
|
|
4476
|
+
handler: async (params) => JSON.stringify(await bridge.removeFromSpriteAtlas(params), null, 2),
|
|
4477
|
+
},
|
|
4478
|
+
{
|
|
4479
|
+
name: "unity_spriteatlas_settings",
|
|
4480
|
+
description: "Update SpriteAtlas packing and texture settings.",
|
|
4481
|
+
inputSchema: {
|
|
4482
|
+
type: "object",
|
|
4483
|
+
properties: {
|
|
4484
|
+
path: { type: "string", description: "Asset path of the SpriteAtlas" },
|
|
4485
|
+
includeInBuild: { type: "boolean", description: "Include in builds" },
|
|
4486
|
+
enableRotation: { type: "boolean", description: "Allow sprite rotation during packing" },
|
|
4487
|
+
enableTightPacking: { type: "boolean", description: "Use tight packing" },
|
|
4488
|
+
padding: { type: "number", description: "Padding between sprites in pixels" },
|
|
4489
|
+
readable: { type: "boolean", description: "Make atlas texture readable" },
|
|
4490
|
+
generateMipMaps: { type: "boolean", description: "Generate mipmaps" },
|
|
4491
|
+
sRGB: { type: "boolean", description: "Use sRGB color space" },
|
|
4492
|
+
filterMode: { type: "string", description: "Texture filter mode (Point, Bilinear, Trilinear)" },
|
|
4493
|
+
},
|
|
4494
|
+
required: ["path"],
|
|
4495
|
+
},
|
|
4496
|
+
handler: async (params) => JSON.stringify(await bridge.setSpriteAtlasSettings(params), null, 2),
|
|
4497
|
+
},
|
|
4498
|
+
{
|
|
4499
|
+
name: "unity_spriteatlas_delete",
|
|
4500
|
+
description: "Delete a SpriteAtlas asset.",
|
|
4501
|
+
inputSchema: {
|
|
4502
|
+
type: "object",
|
|
4503
|
+
properties: {
|
|
4504
|
+
path: { type: "string", description: "Asset path of the SpriteAtlas to delete" },
|
|
4505
|
+
},
|
|
4506
|
+
required: ["path"],
|
|
4507
|
+
},
|
|
4508
|
+
handler: async (params) => JSON.stringify(await bridge.deleteSpriteAtlas(params), null, 2),
|
|
4509
|
+
},
|
|
4510
|
+
{
|
|
4511
|
+
name: "unity_spriteatlas_list",
|
|
4512
|
+
description: "Find all SpriteAtlas assets in the project, optionally filtered by folder.",
|
|
4513
|
+
inputSchema: {
|
|
4514
|
+
type: "object",
|
|
4515
|
+
properties: {
|
|
4516
|
+
folder: { type: "string", description: "Folder to search in (e.g. 'Assets/Atlases'). Omit to search entire project." },
|
|
4517
|
+
},
|
|
4518
|
+
},
|
|
4519
|
+
handler: async (params) => JSON.stringify(await bridge.listSpriteAtlases(params), null, 2),
|
|
4520
|
+
},
|
|
4521
|
+
];
|