docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Class ScriptApplyEditsParams

    Parameters for the Unity.ScriptApplyEdits tool that provides structured C# script editing with safer boundaries and comprehensive validation.

    Inheritance
    object
    ScriptApplyEditsParams
    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.Parameters
    Assembly: Unity.AI.MCP.Editor.dll
    Syntax
    [Serializable]
    public class ScriptApplyEditsParams

    Constructors

    ScriptApplyEditsParams()

    Initializes a new instance of the ScriptApplyEditsParams class.

    Declaration
    public ScriptApplyEditsParams()

    Properties

    Edits

    List of edits to apply to the script. Each edit should contain:

    • op: Operation type (replace_method, insert_method, delete_method, anchor_insert, etc.)
    • Additional fields based on operation type
    Declaration
    public List<Dictionary<string, object>> Edits { get; set; }
    Property Value
    Type Description
    List<Dictionary<string, object>>

    Name

    Name of the script to edit (without .cs extension)

    Declaration
    public string Name { get; set; }
    Property Value
    Type Description
    string

    Namespace

    Namespace of the script

    Declaration
    public string Namespace { get; set; }
    Property Value
    Type Description
    string

    Options

    Options for the script edit operation

    Declaration
    public Dictionary<string, object> Options { get; set; }
    Property Value
    Type Description
    Dictionary<string, object>

    Path

    Path to the script under Assets/ directory

    Declaration
    public string Path { get; set; }
    Property Value
    Type Description
    string

    PreconditionSha256

    Optional precondition SHA256 to prevent concurrent edits

    Declaration
    public string PreconditionSha256 { get; set; }
    Property Value
    Type Description
    string

    Preview

    Whether this is a preview/dry-run operation

    Declaration
    public bool Preview { get; set; }
    Property Value
    Type Description
    bool

    ScriptType

    Type of the script (e.g., MonoBehaviour, ScriptableObject)

    Declaration
    public string ScriptType { get; set; }
    Property Value
    Type Description
    string
    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)