Class ManageEditor
Handles operations related to controlling and querying the Unity Editor state, including managing Tags and Layers.
Inherited Members
Namespace: Unity.AI.MCP.Editor.Tools
Assembly: Unity.AI.MCP.Editor.dll
Syntax
public static class ManageEditor
Fields
Description
Tool description for MCP tool registration, explaining the Unity.ManageEditor tool's capabilities
Declaration
public const string Description = "Controls and queries the Unity editor's state and settings.\n\nArgs:\n Action: Operation (e.g., 'Play', 'Pause', 'GetState', 'SetActiveTool', 'AddTag').\n WaitForCompletion: Optional. If True, waits for certain actions.\n Action-specific arguments (e.g., ToolName, TagName, LayerName).\n\nReturns:\n Dictionary with operation results ('success', 'message', 'data')."
Field Value
| Type | Description |
|---|---|
| string |
Methods
GetOutputSchema()
Returns the output schema for this tool.
Declaration
[McpOutputSchema("Unity.ManageEditor")]
public static object GetOutputSchema()
Returns
| Type | Description |
|---|---|
| object | The JSON schema object describing the tool's output structure. |
HandleCommand(ManageEditorParams)
Main handler for editor management actions.
Declaration
[McpTool("Unity.ManageEditor", "Controls and queries the Unity editor's state and settings.\n\nArgs:\n Action: Operation (e.g., 'Play', 'Pause', 'GetState', 'SetActiveTool', 'AddTag').\n WaitForCompletion: Optional. If True, waits for certain actions.\n Action-specific arguments (e.g., ToolName, TagName, LayerName).\n\nReturns:\n Dictionary with operation results ('success', 'message', 'data').", null, null, Groups = new string[] { "core", "editor" })]
public static object HandleCommand(ManageEditorParams parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ManageEditorParams | parameters | The parameters specifying the action and related settings. |
Returns
| Type | Description |
|---|---|
| object | A response object containing success status, message, and optional data. |