Class ManageScene
Handles scene management operations like loading, saving, creating, and querying hierarchy.
Inherited Members
Namespace: Unity.AI.MCP.Editor.Tools
Assembly: Unity.AI.MCP.Editor.dll
Syntax
public static class ManageScene
Fields
Description
Description of the Unity.ManageScene tool for MCP clients. Provides information about scene management operations including load, save, create, and hierarchy queries.
Declaration
public const string Description = "Manages Unity scenes (load, save, create, get hierarchy, etc.).\n\nArgs:\n Action: Operation (e.g., 'Load', 'Save', 'Create', 'GetHierarchy').\n Name: Scene name (no extension) for create/load/save.\n Path: Asset path for scene operations (default: \"Assets/\").\n BuildIndex: Build index for load/build settings actions.\n # Add other action-specific args as needed (e.g., for hierarchy depth)\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.ManageScene")]
public static object GetOutputSchema()
Returns
| Type | Description |
|---|---|
| object | The JSON schema object describing the tool's output structure. |
HandleCommand(ManageSceneParams)
Main handler for scene management actions.
Declaration
[McpTool("Unity.ManageScene", "Manages Unity scenes (load, save, create, get hierarchy, etc.).\n\nArgs:\n Action: Operation (e.g., 'Load', 'Save', 'Create', 'GetHierarchy').\n Name: Scene name (no extension) for create/load/save.\n Path: Asset path for scene operations (default: \"Assets/\").\n BuildIndex: Build index for load/build settings actions.\n # Add other action-specific args as needed (e.g., for hierarchy depth)\n\nReturns:\n Dictionary with results ('success', 'message', 'data').", null, null, Groups = new string[] { "core", "scene" })]
public static object HandleCommand(ManageSceneParams parameters)
Parameters
| Type | Name | Description |
|---|---|---|
| ManageSceneParams | parameters | The parameters specifying the scene action and related settings. |
Returns
| Type | Description |
|---|---|
| object | A response object containing success status, message, and optional data. |