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
6 changed files with 43 additions and 16 deletions

View File

@ -926,11 +926,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
}
if (!res->editor_can_reload_from_file()) {
Ref<Script> scr = res;
// Scripts are reloaded via the script editor.
if (scr.is_null() || ScriptEditor::get_singleton()->get_open_scripts().has(scr)) {
continue;
}
continue;
}
if (!res->get_path().is_resource_file() && !res->get_path().is_absolute_path()) {
continue;