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 /core/io | |
parent | 104af08e9d7c8308c2dd6cad89a0caee774043a0 (diff) |
Defer clearing of ResourceUID cache and silence warnings
Diffstat (limited to 'core/io')
-rw-r--r-- | core/io/resource_format_binary.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index 2a79067e02..4611528db7 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -1042,7 +1042,14 @@ void ResourceLoaderBinary::open(Ref<FileAccess> p_f, bool p_no_resources, bool p // If a UID is found and the path is valid, it will be used, otherwise, it falls back to the path. er.path = ResourceUID::get_singleton()->get_id_path(er.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(res_path) != er.uid) { + WARN_PRINT(String(res_path + ": In external resource #" + itos(i) + ", invalid UUID: " + ResourceUID::get_singleton()->id_to_text(er.uid) + " - using text path instead: " + er.path).utf8().get_data()); + } +#else WARN_PRINT(String(res_path + ": In external resource #" + itos(i) + ", invalid UUID: " + ResourceUID::get_singleton()->id_to_text(er.uid) + " - using text path instead: " + er.path).utf8().get_data()); +#endif } } } |