diff options
author | kobewi <kobewi4e@gmail.com> | 2022-10-09 13:52:04 +0200 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-10-10 11:20:23 +0200 |
commit | 14b82c36a25755b18f6d18102167b50fd4ac01e8 (patch) | |
tree | 5e8f0d0970044305e06d57b732bd71b875417a84 /scene | |
parent | 104af08e9d7c8308c2dd6cad89a0caee774043a0 (diff) |
Defer clearing of ResourceUID cache and silence warnings
Diffstat (limited to 'scene')
-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 } } |