script-update-or-create
Update or create C# script files in Unity projects, automatically refreshing assets and reporting compilation errors to maintain code integrity.
Instructions
Updates or creates script file with the provided C# code. Does AssetDatabase.Refresh() at the end. Provides compilation error details if the code has syntax errors. Use 'script-read' tool to read existing script files first.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| filePath | Yes | Path to the script file. Example: "Assets/Scripts/MyScript.cs" | |
| content | Yes | Full C# source code content for the file. | |
| requestId | No |