Merge pull request #70668 from KoBeWi/never_give_up

Retry loading addons after filesystem scan
This commit is contained in:
Rémi Verschelde 2023-01-16 09:47:17 +01:00
commit 0f0b853c98
No known key found for this signature in database
GPG key ID: C3336907360768E1
4 changed files with 26 additions and 0 deletions

View file

@ -1527,6 +1527,7 @@ void EditorFileSystem::update_script_classes() {
ScriptServer::save_global_classes();
EditorNode::get_editor_data().script_class_save_icon_paths();
emit_signal("script_classes_updated");
// 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.
@ -2417,6 +2418,7 @@ void EditorFileSystem::_bind_methods() {
ClassDB::bind_method(D_METHOD("reimport_files", "files"), &EditorFileSystem::reimport_files);
ADD_SIGNAL(MethodInfo("filesystem_changed"));
ADD_SIGNAL(MethodInfo("script_classes_updated"));
ADD_SIGNAL(MethodInfo("sources_changed", PropertyInfo(Variant::BOOL, "exist")));
ADD_SIGNAL(MethodInfo("resources_reimported", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));
ADD_SIGNAL(MethodInfo("resources_reload", PropertyInfo(Variant::PACKED_STRING_ARRAY, "resources")));