Skip to content

Commit e2c5d2f

Browse files
committed
Merge pull request #82113 from nongvantinh/fix-50163
Allow Editor to reload external changes of scripts
2 parents f220d46 + c051c44 commit e2c5d2f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

editor/editor_node.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -870,7 +870,11 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
870870
}
871871

872872
if (!res->editor_can_reload_from_file()) {
873-
continue;
873+
Ref<Script> scr = res;
874+
// Scripts are reloaded via the script editor.
875+
if (scr.is_null() || ScriptEditor::get_singleton()->get_open_scripts().has(scr)) {
876+
continue;
877+
}
874878
}
875879
if (!res->get_path().is_resource_file() && !res->get_path().is_absolute_path()) {
876880
continue;

0 commit comments

Comments
 (0)