Fix ResourceLoader.has_cached() and ResourceLoader.get_cached_ref() not handling UIDs.

This commit is contained in:
Tareq Anuar
2025-01-18 19:46:03 +08:00
parent 7b1ed520bd
commit 9014cdb596
3 changed files with 10 additions and 3 deletions
+2 -2
View File
@@ -113,12 +113,12 @@ PackedStringArray ResourceLoader::get_dependencies(const String &p_path) {
}
bool ResourceLoader::has_cached(const String &p_path) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
String local_path = ::ResourceLoader::_validate_local_path(p_path);
return ResourceCache::has(local_path);
}
Ref<Resource> ResourceLoader::get_cached_ref(const String &p_path) {
String local_path = ProjectSettings::get_singleton()->localize_path(p_path);
String local_path = ::ResourceLoader::_validate_local_path(p_path);
return ResourceCache::get_ref(local_path);
}