Merge pull request #54662 from KoBeWi/now_with_reloading

Properly reload built-in tool scripts
This commit is contained in:
Rémi Verschelde 2021-11-09 23:00:35 +01:00 committed by GitHub
commit 284b50cf30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -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);
}
}
}