diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 7218287e23..d723df7718 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -2866,6 +2866,19 @@ Node *Node::_duplicate(int p_flags, HashMap *r_duplimap) c } } } + + for (List::Element *N = node_tree.front(); N; N = N->next()) { + const Node *source_node = N->get(); + if (source_node->get_scene_file_path().is_empty()) { + continue; + } + + NodePath relative_path = get_path_to(source_node); + Node *duplicated_node = node->get_node_or_null(relative_path); + ERR_CONTINUE(!duplicated_node); + + duplicated_node->data.editable_instance = source_node->data.editable_instance; + } } if (get_name() != String()) {