avoid cleanup for non-loadable assets

This commit is contained in:
Nolan Carroll 2023-09-28 12:10:18 -04:00
parent 4c3dc26367
commit 3770ee3c9e
1 changed files with 6 additions and 3 deletions

View File

@ -499,9 +499,12 @@ void ImportDock::_reimport_attempt() {
String imported_with = config->get_value("remap", "importer");
if (imported_with != importer_name) {
need_cleanup.push_back(params->paths[i]);
if (_find_owners(EditorFileSystem::get_singleton()->get_filesystem(), params->paths[i])) {
used_in_resources = true;
Ref<Resource> resource = ResourceLoader::load(params->paths[i]);
if (resource.is_valid()) {
need_cleanup.push_back(params->paths[i]);
if (_find_owners(EditorFileSystem::get_singleton()->get_filesystem(), params->paths[i])) {
used_in_resources = true;
}
}
}
}