Browse Source

Preserve scene unique names when saving branch as scene.

HolonProduction 2 years ago
parent
commit
7814dedc91
1 changed files with 2 additions and 0 deletions
  1. 2 0
      editor/scene_tree_dock.cpp

+ 2 - 0
editor/scene_tree_dock.cpp

@@ -276,6 +276,8 @@ void SceneTreeDock::_replace_with_branch_scene(const String &p_file, Node *base)
 		return;
 		return;
 	}
 	}
 
 
+	instantiated_scene->set_unique_name_in_owner(base->is_unique_name_in_owner());
+
 	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
 	EditorUndoRedoManager *undo_redo = EditorUndoRedoManager::get_singleton();
 	undo_redo->create_action(TTR("Replace with Branch Scene"));
 	undo_redo->create_action(TTR("Replace with Branch Scene"));