set_scene_script
Attach or detach GDScript from Godot scene nodes, automatically updating scene files with proper resource references.
Instructions
Attach a GDScript to a node in a scene, or detach the current script. Automatically adds the ext_resource entry to the .tscn file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Absolute path to the project directory | |
| scenePath | Yes | Scene file path | |
| nodePath | Yes | Node path to attach the script to (e.g. . for root, or Player) | |
| scriptPath | No | Script path (res:// or relative). Omit to detach the current script. |