docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class DeleteScript

    Handles deletion of C# scripts by URI or Assets-relative path.

    Inheritance
    object
    DeleteScript
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Unity.AI.MCP.Editor.Tools
    Assembly: Unity.AI.MCP.Editor.dll
    Syntax
    public static class DeleteScript

    Fields

    Description

    Human-readable description of the Unity.DeleteScript tool functionality and usage.

    Declaration
    public const string Description = "Delete a C# script by URI or Assets-relative path.\n\nArgs: uri (unity://path/... or file://... or Assets/...).\nRules: Target must resolve under Assets/."
    Field Value
    Type Description
    string

    Methods

    GetOutputSchema()

    Returns the output schema for this tool.

    Declaration
    [McpOutputSchema("Unity.DeleteScript")]
    public static object GetOutputSchema()
    Returns
    Type Description
    object

    The output schema object defining the structure of successful responses.

    HandleCommand(DeleteScriptParams)

    Main handler for script deletion.

    Declaration
    [McpTool("Unity.DeleteScript", "Delete a C# script by URI or Assets-relative path.\n\nArgs: uri (unity://path/... or file://... or Assets/...).\nRules: Target must resolve under Assets/.", null, null, Groups = new string[] { "core", "scripting" })]
    public static object HandleCommand(DeleteScriptParams parameters)
    Parameters
    Type Name Description
    DeleteScriptParams parameters

    Parameters containing the URI or path of the script to delete.

    Returns
    Type Description
    object

    A response object indicating success or failure with relevant details.

    In This Article
    Back to top
    Copyright © 2026 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)