Make sure ScriptLanguage is initialized even after init_languages call

(cherry picked from commit 9cebbf12dc231b3e8baa090879a176becbd1424b)
This commit is contained in:
gilzoide
2025-12-17 20:29:21 -03:00
committed by Thaddeus Crews
parent 467d4e3793
commit 6062c5eac6
+7
View File
@@ -253,6 +253,13 @@ Error ScriptServer::register_language(ScriptLanguage *p_language) {
ERR_FAIL_COND_V_MSG(other_language->get_type() == p_language->get_type(), ERR_ALREADY_EXISTS, vformat("A script language with type '%s' is already registered.", p_language->get_type()));
}
_languages[_language_count++] = p_language;
// Make sure the new language is initialized in case languages have already been initialized before
// This happens when importing the GDExtension for the first time in the editor
if (languages_ready) {
p_language->init();
}
return OK;
}