duplicate_node
Duplicate a node and its descendants in a Godot scene to quickly clone a configured subtree without manual step-by-step recreation, with automatic saving.
Instructions
Duplicate a node and its descendants in a Godot scene. Use to clone a configured subtree without re-creating it node-by-node via add_node. newName defaults to the original name + "2"; targetParentPath defaults to the original parent. Saves automatically. Errors if nodePath does not exist or targetParentPath cannot accept children. Returns { success, originalPath, newPath }.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| scenePath | Yes | Scene file path relative to the project | |
| nodePath | Yes | Node path from scene root to duplicate | |
| newName | No | Name for the duplicated node (default: original name + "2") | |
| targetParentPath | No | Parent node path for the duplicate (default: same parent as original) |