mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Only unload the library when no NativeScript objects exist if the reloadable flag is true. If it is false it is likely the library does other things and can't be unloaded
This commit is contained in:
parent
f0951537a4
commit
ae7675065a
1 changed files with 1 additions and 1 deletions
|
@ -1728,7 +1728,7 @@ void NativeScriptLanguage::unregister_script(NativeScript *script) {
|
|||
library_script_users.erase(S);
|
||||
|
||||
Map<String, Ref<GDNative>>::Element *G = library_gdnatives.find(script->lib_path);
|
||||
if (G) {
|
||||
if (G && G->get()->get_library()->is_reloadable()) {
|
||||
G->get()->terminate();
|
||||
library_gdnatives.erase(G);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue