You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-29 16:16:38 +00:00
Actually use loaded resource cache
This commit is contained in:
@@ -339,7 +339,18 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) {
|
||||
path = ProjectSettings::get_singleton()->localize_path(res_path.get_base_dir().plus_file(path));
|
||||
}
|
||||
|
||||
RES res = ResourceLoader::load(path, exttype, no_subresource_cache);
|
||||
RES res;
|
||||
|
||||
for (List<RES>::Element *E = resource_cache.front(); E; E = E->next()) {
|
||||
if (E->get()->get_path() == path) {
|
||||
res = E->get();
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (res.is_null()) {
|
||||
res = ResourceLoader::load(path, exttype, no_subresource_cache);
|
||||
}
|
||||
|
||||
if (res.is_null()) {
|
||||
WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data());
|
||||
|
||||
Reference in New Issue
Block a user