Skip to content

Commit

Permalink
Merge pull request #54662 from KoBeWi/now_with_reloading
Browse files Browse the repository at this point in the history
Properly reload built-in tool scripts
  • Loading branch information
akien-mga authored Nov 9, 2021
2 parents 06a33e5 + 75e8eaf commit 284b50c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions editor/plugins/script_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1015,6 +1015,11 @@ void ScriptEditor::_scene_saved_callback(const String &p_path) {
if (edited_res->get_path().get_slice("::", 0) == p_path) {
se->tag_saved_version();
}

Ref<Script> scr = edited_res;
if (scr.is_valid() && scr->is_tool()) {
scr->reload(true);
}
}
}

Expand Down

0 comments on commit 284b50c

Please sign in to comment.