Make sure ScriptLanguage is initialized even after init_languages call
This commit is contained in:
parent
79603b2f28
commit
9cebbf12dc
1 changed files with 7 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue