summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorHolonProduction <holonproduction@gmail.com>2023-04-30 13:33:43 +0200
committerRĂ©mi Verschelde <rverschelde@gmail.com>2023-05-12 12:07:00 +0200
commita07ad181ab71e374082fa37cea6b399bd4c8092d (patch)
treeeec3fe433a409436c64aac1a203b3cf65afc5e95 /editor
parent70f7fcd208213d052720ce5b80a4249f4c051592 (diff)
Preserve scene unique names when saving branch as scene.
(cherry picked from commit 7814dedc91a9df70a6c873d0ad30f444c401b0ec)
Diffstat (limited to 'editor')
-rw-r--r--editor/scene_tree_dock.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index d8f1d92e44..f1e1136c83 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -275,6 +275,8 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
return;
}
+ instantiated_scene->set_unique_name_in_owner(base->is_unique_name_in_owner());
+
EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
undo_redo->create_action(TTR("Replace with Branch Scene"));