diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-10 13:52:32 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2022-10-10 13:52:32 +0200 |
commit | 5616898184149505ac5770a24066d72e159dfca2 (patch) | |
tree | af35fe3f2958f525c978707f81ba47c0fa8cf192 /scene/resources/resource_format_text.cpp | |
parent | 543128d84de7d9412da71d67f5cb674c522b6f7d (diff) | |
parent | 14b82c36a25755b18f6d18102167b50fd4ac01e8 (diff) |
Merge pull request #67128 from KoBeWi/call_deferred_always_works
Defer clearing of ResourceUID cache
Diffstat (limited to 'scene/resources/resource_format_text.cpp')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index c0d65fb445..85b538b1d9 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -445,7 +445,14 @@ Error ResourceLoaderText::load() { // If a UID is found and the path is valid, it will be used, otherwise, it falls back to the path. path = ResourceUID::get_singleton()->get_id_path(uid); } else { +#ifdef TOOLS_ENABLED + // Silence a warning that can happen during the initial filesystem scan due to cache being regenerated. + if (ResourceLoader::get_resource_uid(path) != uid) { + WARN_PRINT(String(res_path + ":" + itos(lines) + " - ext_resource, invalid UUID: " + uidt + " - using text path instead: " + path).utf8().get_data()); + } +#else WARN_PRINT(String(res_path + ":" + itos(lines) + " - ext_resource, invalid UUID: " + uidt + " - using text path instead: " + path).utf8().get_data()); +#endif } } |