Merge pull request #95689 from Hilderin/fix-uid-paths-fail-editor-startup
Fix `uid://` paths fail to load at editor startup
This commit is contained in:
commit
846f43c7fc
|
@ -386,6 +386,8 @@ void EditorFileSystem::_scan_filesystem() {
|
||||||
// On the first scan, the first_scan_root_dir is created in _first_scan_filesystem.
|
// On the first scan, the first_scan_root_dir is created in _first_scan_filesystem.
|
||||||
if (first_scan) {
|
if (first_scan) {
|
||||||
sd = first_scan_root_dir;
|
sd = first_scan_root_dir;
|
||||||
|
// Will be updated on scan.
|
||||||
|
ResourceUID::get_singleton()->clear();
|
||||||
} else {
|
} else {
|
||||||
Ref<DirAccess> d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
Ref<DirAccess> d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||||
sd = memnew(ScannedDirectory);
|
sd = memnew(ScannedDirectory);
|
||||||
|
@ -3061,7 +3063,6 @@ EditorFileSystem::EditorFileSystem() {
|
||||||
using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
|
using_fat32_or_exfat = (da->get_filesystem_type() == "FAT32" || da->get_filesystem_type() == "exFAT");
|
||||||
|
|
||||||
scan_total = 0;
|
scan_total = 0;
|
||||||
callable_mp(ResourceUID::get_singleton(), &ResourceUID::clear).call_deferred(); // Will be updated on scan.
|
|
||||||
ResourceSaver::set_get_resource_id_for_path(_resource_saver_get_resource_id_for_path);
|
ResourceSaver::set_get_resource_id_for_path(_resource_saver_get_resource_id_for_path);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue