diff options
-rw-r--r-- | editor/import/resource_importer_scene.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp index 8f66cce39a..1de276b940 100644 --- a/editor/import/resource_importer_scene.cpp +++ b/editor/import/resource_importer_scene.cpp @@ -1290,7 +1290,10 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p Object::cast_to<Spatial>(scene)->scale(Vector3(root_scale, root_scale, root_scale)); } - scene->set_name(p_options["nodes/root_name"]); + if (p_options["nodes/root_name"] != "Scene Root") + scene->set_name(p_options["nodes/root_name"]); + else + scene->set_name(p_save_path.get_file().get_basename()); err = OK; |