From 59f933b0e17e23bff91e3eb1fcc83992979eeb5b Mon Sep 17 00:00:00 2001 From: Nong Van Tinh Date: Thu, 22 Sep 2022 17:02:07 +0700 Subject: Fixed root name invalid at scene creation. --- editor/scene_create_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/editor/scene_create_dialog.cpp b/editor/scene_create_dialog.cpp index 573e57ca04..4563dbb0f7 100644 --- a/editor/scene_create_dialog.cpp +++ b/editor/scene_create_dialog.cpp @@ -133,7 +133,7 @@ void SceneCreateDialog::update_dialog() { root_name = scene_name.get_file().get_basename(); } - if (!root_name.is_valid_identifier()) { + if (root_name.is_empty() || root_name.validate_node_name().size() != root_name.size()) { update_error(node_error_label, MSG_ERROR, TTR("Invalid root node name.")); is_valid = false; } -- cgit v1.2.3