mirror of
https://github.com/godotengine/godot.git
synced 2024-12-09 10:09:20 +08:00
Merge pull request #50841 from Blackiris/fix-instantiate-line-class
Fix instantiate line class
This commit is contained in:
commit
e2ebc7db58
@ -1643,17 +1643,17 @@ void GDScriptLanguage::init() {
|
||||
|
||||
List<StringName> class_list;
|
||||
ClassDB::get_class_list(&class_list);
|
||||
for (StringName &n : class_list) {
|
||||
for (const StringName &n : class_list) {
|
||||
String s = String(n);
|
||||
if (s.begins_with("_")) {
|
||||
n = s.substr(1, s.length());
|
||||
s = s.substr(1, s.length());
|
||||
}
|
||||
|
||||
if (globals.has(n)) {
|
||||
if (globals.has(s)) {
|
||||
continue;
|
||||
}
|
||||
Ref<GDScriptNativeClass> nc = memnew(GDScriptNativeClass(n));
|
||||
_add_global(n, nc);
|
||||
_add_global(s, nc);
|
||||
}
|
||||
|
||||
//populate singletons
|
||||
|
Loading…
Reference in New Issue
Block a user