Fix sub-resource IDs resetting when preloaded

This commit is contained in:
kobewi 2023-01-28 16:20:03 +01:00
parent bdad9770d6
commit 095c805079

View File

@ -601,9 +601,11 @@ Error ResourceLoaderText::load() {
*progress = resource_current / float(resources_total);
}
int_resources[id] = res; //always assign int resources
if (do_assign && cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) {
res->set_path(path, cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE);
int_resources[id] = res; // Always assign int resources.
if (do_assign) {
if (cache_mode != ResourceFormatLoader::CACHE_MODE_IGNORE) {
res->set_path(path, cache_mode == ResourceFormatLoader::CACHE_MODE_REPLACE);
}
res->set_scene_unique_id(id);
}