summaryrefslogtreecommitdiff
path: root/editor/editor_file_system.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'editor/editor_file_system.cpp')
-rw-r--r--editor/editor_file_system.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index 94eb1a3399..37e2079b64 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -1401,6 +1401,14 @@ void EditorFileSystem::update_script_classes() {
ScriptServer::save_global_classes();
EditorNode::get_editor_data().script_class_save_icon_paths();
+
+ // Rescan custom loaders and savers.
+ // Doing the following here because the `filesystem_changed` signal fires multiple times and isn't always followed by script classes update.
+ // So I thought it's better to do this when script classes really get updated
+ ResourceLoader::remove_custom_loaders();
+ ResourceLoader::add_custom_loaders();
+ ResourceSaver::remove_custom_savers();
+ ResourceSaver::add_custom_savers();
}
void EditorFileSystem::_queue_update_script_classes() {