godot_attach_script
Attach GDScript files to Godot scene nodes, creating scripts automatically when needed to streamline game development workflows.
Instructions
Attach a GDScript file to a specific node in a saved scene, creating the script file first when needed.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | Path to the Godot project directory or its project.godot file. | |
| scene_path | Yes | Path to the target .tscn file. Absolute, relative, and res:// paths are supported. | |
| node_path | No | Scene-relative node path to receive the script. Use '.' for the root node. | . |
| script_path | No | Optional absolute, relative, or res:// path for the target `.gd` file inside the project. | |
| script_name | No | Optional human-friendly script name or filename when creating a new script, such as 'Hero Controller' or 'hero_controller.gd'. | |
| folder | No | Project-relative folder where a new script should be created when `script_path` is omitted. | scripts |
| script_code | No | Optional explicit GDScript source. When omitted and the script does not exist yet, a starter template is generated. | |
| overwrite | No | Whether to replace an existing script file when `script_code` is provided. | |
| godot_executable | No | Optional explicit path to the Godot executable or .app bundle. |