Class ScriptApplyEditsParams
Parameters for the Unity.ScriptApplyEdits tool that provides structured C# script editing with safer boundaries and comprehensive validation.
Inherited Members
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 |