Class ManageShader
Handles CRUD operations for shader files within the Unity project.
Inherited Members
Namespace: Unity.AI.MCP.Editor.Tools
Assembly: Unity.AI.MCP.Editor.dll
Syntax
public static class ManageShader
Fields
Description
Description of the Unity.ManageShader tool for MCP clients. Provides information about shader CRUD operations including create, read, update, and delete.
Declaration
public const string Description = "Manages shader scripts in Unity (create, read, update, delete).\n\nArgs:\n Action: Operation ('Create', 'Read', 'Update', 'Delete').\n Name: Shader name (no .cs extension).\n Path: Asset path (default: \"Assets/\").\n Contents: Shader code for 'create'/'update'.\n\nReturns:\n Dictionary with results ('success', 'message', 'data')."
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetOutputSchema()
Returns the output schema for this tool.
Declaration
[McpOutputSchema("Unity.ManageShader")]
public static object GetOutputSchema()
Returns
| Type | Description |
|---|---|
| object | The JSON schema object describing the tool's output structure. |
HandleCommand(ManageShaderParams)
Main handler for shader management actions.
Declaration
[McpTool("Unity.ManageShader", "Manages shader scripts in Unity (create, read, update, delete).\n\nArgs:\n Action: Operation ('Create', 'Read', 'Update', 'Delete').\n Name: Shader name (no .cs extension).\n Path: Asset path (default: \"Assets/\").\n Contents: Shader code for 'create'/'update'.\n\nReturns:\n Dictionary with results ('success', 'message', 'data').", null, null, Groups = new string[] { "assets", "scripting" })]
public static object HandleCommand(ManageShaderParams parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ManageShaderParams | parameters | The parameters specifying the shader action and related settings. |
Returns
| Type | Description |
|---|---|
| object | A response object containing success status, message, and optional data. |