Change a scene
godot_scene_editEdit .tscn scenes without the Godot editor: add or remove nodes, set properties, connect signals, and attach scripts, previewing a diff before writing changes.
Instructions
Change a .tscn safely, without the editor: add a node (a Godot class or an instanced scene), remove a node (with its children, connections and the resources only it used), set a property (name and type checked against Godot 4.7; enums by name, resources as res:// files), connect or disconnect a signal (checks the signal exists, and warns when the method is missing or takes the wrong number of arguments, with the func line to add), or attach a script (refuses one that extends another node type). Node paths are relative to the scene root, which is ".". op picks the change and which fields it needs: add_node (parent, name, and type or instance), remove_node (node), set (node, property, value), connect and disconnect (from, signal, to, method), attach_script (node, script). Only the lines of that change are touched. Without write it changes nothing and returns the diff and warnings; with write: true it writes and reports the review errors before and after (an error result when there are more after). A missing field or a change it refuses returns an error and writes nothing. Use it instead of editing .tscn files by hand. For project.godot use godot_project_edit; to rename a node everywhere, use godot_rename.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | what to change | |
| to | No | connect/disconnect: path of the node that receives | |
| from | No | connect/disconnect: path of the node that emits | |
| name | No | add_node: name of the new node | |
| node | No | remove_node/set/attach_script: path of the node ("." is the root) | |
| type | No | add_node: a Godot node class, e.g. Sprite2D | |
| scene | Yes | the scene: res://main.tscn, or a path | |
| value | No | set: the value, e.g. Vector2(10, 20), 3, true, ALWAYS, res://icon.svg, null | |
| write | No | write the change (default false: show the diff only) | |
| method | No | connect/disconnect: method name | |
| parent | No | add_node: path of the parent ("." is the root) | |
| script | No | attach_script: res:// path of the script | |
| signal | No | connect/disconnect: signal name | |
| instance | No | add_node: a res:// scene to instance instead of a type | |
| property | No | set: property name, e.g. position |