summaryrefslogtreecommitdiff
path: root/scene/resources/resource_format_text.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2022-10-10 13:52:32 +0200
committerRémi Verschelde <rverschelde@gmail.com>2022-10-10 13:52:32 +0200
commit5616898184149505ac5770a24066d72e159dfca2 (patch)
treeaf35fe3f2958f525c978707f81ba47c0fa8cf192 /scene/resources/resource_format_text.cpp
parent543128d84de7d9412da71d67f5cb674c522b6f7d (diff)
parent14b82c36a25755b18f6d18102167b50fd4ac01e8 (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.cpp7
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
}
}