Script Attach
script_attachAttach a GDScript or C# script to a scene node, replacing any existing script. Undoable.
Instructions
Attach a script to a node in the scene tree.
Replaces any existing script on the node. Undoable.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Scene path of the node (e.g. "/Main/Player"). | |
| session_id | No | Optional Godot session to target. Empty = active session. | |
| script_path | Yes | res:// path of the .gd (e.g. "res://scripts/player.gd"). A .cs requires a .NET-enabled editor build; other builds get a clear error. Build the assembly before expecting executable behavior. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||