From 7e270262f923d0e94d227bd456ae4756dd634391 Mon Sep 17 00:00:00 2001 From: Relintai Date: Wed, 30 Aug 2023 13:00:40 +0200 Subject: [PATCH] Ported: Fix binary internal cache not being filled - Razoric480 https://github.com/godotengine/godot/commit/d331e5c7ac4865e9d023ebfbba1bc6473d0ecec6 --- core/io/resource_format_binary.cpp | 5 +++-- scene/resources/resource_format_text.cpp | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index bff2da638..ff5d05709 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -380,7 +380,7 @@ Error ResourceInteractiveLoaderBinary::parse_variant(Variant &r_v) { path = remaps[path]; } - RES res = ResourceLoader::load(path, exttype, no_subresource_cache); + RES res = ResourceLoader::load(path, exttype, false); if (res.is_null()) { WARN_PRINT(String("Couldn't load resource: " + path).utf8().get_data()); @@ -724,7 +724,7 @@ Error ResourceInteractiveLoaderBinary::poll() { if (remaps.has(path)) { path = remaps[path]; } - RES res = ResourceLoader::load(path, external_resources[s].type, no_subresource_cache); + RES res = ResourceLoader::load(path, external_resources[s].type, false); if (res.is_null()) { if (!ResourceLoader::get_abort_on_missing_resources()) { ResourceLoader::notify_dependency_error(local_path, path, external_resources[s].type); @@ -827,6 +827,7 @@ Error ResourceInteractiveLoaderBinary::poll() { #endif stage++; + internal_resources_cache[subindex] = res; resource_cache.push_back(res); if (main) { diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index c4531bf7e..cad2c4591 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -403,7 +403,7 @@ Error ResourceInteractiveLoaderText::poll() { path = remaps[path]; } - RES res = ResourceLoader::load(path, type, no_subresource_cache); + RES res = ResourceLoader::load(path, type, false); if (res.is_null()) { if (ResourceLoader::get_abort_on_missing_resources()) {