Fix reloading scripts already in use

This commit is contained in:
Hilderin 2024-09-18 19:37:12 -04:00
parent 694d3c2930
commit 9638220473
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;