Merge pull request #97168 from Hilderin/fix-reloading-scripts-already-in-use

Fix reloading scripts already in use
This commit is contained in:
Rémi Verschelde 2024-09-20 21:35:08 +02:00 committed by GitHub
commit 621cadcf65
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 43 additions and 16 deletions

View file

@ -1483,7 +1483,7 @@ void ScriptEditor::_menu_option(int p_option) {
current->apply_code();
Error err = scr->reload(false); // Always hard reload the script before running.
Error err = scr->reload(true); // Always hard reload the script before running.
if (err != OK || !scr->is_valid()) {
EditorToaster::get_singleton()->popup_str(TTR("Cannot run the script because it contains errors, check the output log."), EditorToaster::SEVERITY_WARNING);
return;