Skip to content

armgit / godot

Public Imported from GitHub
0

Godot Engine – Multi-platform 2D and 3D game engine

Fix name casing regression for built-in nodes

Michael Alexsanderacacbacf66b9
diff --git a/editor/docks/scene_tree_dock.cpp b/editor/docks/scene_tree_dock.cpp
index 06608a4a934..153ec3daa92 100644
--- a/editor/docks/scene_tree_dock.cpp
+++ b/editor/docks/scene_tree_dock.cpp
@@ -3170,6 +3170,9 @@ Node *SceneTreeDock::_do_create(Node *p_parent) {
ERR_FAIL_NULL_V(child, nullptr);
String new_name = child->get_name();
+ if (new_name.is_empty()) {
+ new_name = child->get_class();
+ }
if (GLOBAL_GET("editor/naming/node_name_casing").operator int() != NAME_CASING_PASCAL_CASE) {
new_name = adjust_name_casing(new_name);
}