mirror of
https://github.com/godotengine/godot
synced 2024-09-05 22:42:16 +00:00
[Editor] Unload addons before quitting to allow cleanup.
This commit is contained in:
parent
71699e08c9
commit
d96c58bbd0
|
@ -3322,6 +3322,13 @@ void EditorNode::_exit_editor(int p_exit_code) {
|
|||
// Dim the editor window while it's quitting to make it clearer that it's busy.
|
||||
dim_editor(true);
|
||||
|
||||
// Unload addons before quitting to allow cleanup.
|
||||
for (const KeyValue<String, EditorPlugin *> &E : addon_name_to_plugin) {
|
||||
print_verbose(vformat("Unloading addon: %s", E.key));
|
||||
remove_editor_plugin(E.value, false);
|
||||
memdelete(E.value);
|
||||
}
|
||||
|
||||
get_tree()->quit(p_exit_code);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue