diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-10 08:13:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-10 08:13:14 +0200 |
commit | d56da233c4a3a0ed83ae74c6a5674bb0673650e1 (patch) | |
tree | 659e13755024836caa433b25ed3cfff4b17ec709 /scene/resources | |
parent | 536950f9f35f48633c6c2c57ae2473bb906221d2 (diff) | |
parent | d00c151db1ce7cba4f87e387ecccb4ef7362c0cb (diff) |
Merge pull request #51463 from SaracenOne/assign_path_fix
Assign embedded text resource path earlier to prevent error on embedded scripts
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 2b93414906..dbe118a262 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -558,6 +558,12 @@ Error ResourceLoaderText::load() { resource_current++; + 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); + res->set_scene_unique_id(id); + } + while (true) { String assign; Variant value; @@ -585,12 +591,6 @@ Error ResourceLoaderText::load() { } } - 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); - res->set_scene_unique_id(id); - } - if (progress && resources_total > 0) { *progress = resource_current / float(resources_total); } |