From 3badff1f53b1bfa5d179d89045f6e64fa0a0c3fa Mon Sep 17 00:00:00 2001 From: scgm0 <2682963017@qq.com> Date: Tue, 3 Sep 2024 07:26:42 +0800 Subject: [PATCH] Allow class names to be unicode --- core/extension/gdextension.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/extension/gdextension.cpp b/core/extension/gdextension.cpp index d4b50facb22..63962a310b2 100644 --- a/core/extension/gdextension.cpp +++ b/core/extension/gdextension.cpp @@ -355,7 +355,7 @@ void GDExtension::_register_extension_class_internal(GDExtensionClassLibraryPtr StringName class_name = *reinterpret_cast(p_class_name); StringName parent_class_name = *reinterpret_cast(p_parent_class_name); - ERR_FAIL_COND_MSG(!String(class_name).is_valid_ascii_identifier(), "Attempt to register extension class '" + class_name + "', which is not a valid class identifier."); + ERR_FAIL_COND_MSG(!String(class_name).is_valid_unicode_identifier(), "Attempt to register extension class '" + class_name + "', which is not a valid class identifier."); ERR_FAIL_COND_MSG(ClassDB::class_exists(class_name), "Attempt to register extension class '" + class_name + "', which appears to be already registered."); Extension *parent_extension = nullptr;