write_script
Writes C# scripts into the Unity project for game logic. Overwrites existing files with automatic backup and supports component attachment via build_scene.
Instructions
Schreibt ein C#-Skript (MonoBehaviour etc.) ins Projekt, z.B. rel_path='Assets/Scripts/PlayerController.cs'. Überschreibt mit Backup. Path-Sandbox aktiv. Kernbaustein für Game-Logik; danach via build_scene als Komponente per Klassenname anhängbar.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"project_path": "<project_path>",
"rel_path": "<rel_path>",
"content": "<content>"
},
"name": "write_script"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| rel_path | Yes | ||
| content | Yes |