mirror of
https://github.com/godotengine/godot.git
synced 2025-03-01 23:21:39 +08:00
Merge pull request #58007 from reduz/fix-resoure-reuse-in-binary-loader
This commit is contained in:
commit
b50ec3753e
@ -678,11 +678,13 @@ Error ResourceLoaderBinary::load() {
|
||||
internal_resources.write[i].path = path; // Update path.
|
||||
}
|
||||
|
||||
if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE) {
|
||||
if (ResourceCache::has(path)) {
|
||||
if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE && ResourceCache::has(path)) {
|
||||
RES cached = ResourceCache::get(path);
|
||||
if (cached.is_valid()) {
|
||||
//already loaded, don't do anything
|
||||
stage++;
|
||||
error = OK;
|
||||
internal_index_cache[path] = cached;
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user