You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-20 14:45:44 +00:00
Fix resource reuse in binary loader
* Reuse was not setting the internal index. * Supersedes #52599, without re-reading all properties.
This commit is contained in:
@@ -678,11 +678,13 @@ Error ResourceLoaderBinary::load() {
|
|||||||
internal_resources.write[i].path = path; // Update path.
|
internal_resources.write[i].path = path; // Update path.
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE) {
|
if (cache_mode == ResourceFormatLoader::CACHE_MODE_REUSE && ResourceCache::has(path)) {
|
||||||
if (ResourceCache::has(path)) {
|
RES cached = ResourceCache::get(path);
|
||||||
|
if (cached.is_valid()) {
|
||||||
//already loaded, don't do anything
|
//already loaded, don't do anything
|
||||||
stage++;
|
stage++;
|
||||||
error = OK;
|
error = OK;
|
||||||
|
internal_index_cache[path] = cached;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user