mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Merge pull request #94116 from bruvzg/ed_quit_unload
[Editor] Unload addons when using `--import` or `--quit`.
This commit is contained in:
commit
f649112dfc
3 changed files with 19 additions and 2 deletions
|
|
@ -4170,7 +4170,13 @@ bool Main::iteration() {
|
|||
movie_writer->add_frame();
|
||||
}
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
bool quit_after_timeout = false;
|
||||
#endif
|
||||
if ((quit_after > 0) && (Engine::get_singleton()->_process_frames >= quit_after)) {
|
||||
#ifdef TOOLS_ENABLED
|
||||
quit_after_timeout = true;
|
||||
#endif
|
||||
exit = true;
|
||||
}
|
||||
|
||||
|
|
@ -4203,6 +4209,12 @@ bool Main::iteration() {
|
|||
}
|
||||
#endif
|
||||
|
||||
#ifdef TOOLS_ENABLED
|
||||
if (exit && quit_after_timeout && EditorNode::get_singleton()) {
|
||||
EditorNode::get_singleton()->unload_editor_addons();
|
||||
}
|
||||
#endif
|
||||
|
||||
return exit;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue