|
@@ -339,8 +339,8 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
- ERR_FAIL_COND_V_MSG(found, Ref<Resource>(),
|
|
|
|
- vformat("Failed loading resource: %s. Make sure resources have been imported by opening the project in the editor at least once.", p_path));
|
|
|
|
|
|
+
|
|
|
|
+ ERR_FAIL_COND_V_MSG(found, Ref<Resource>(), vformat("Failed loading resource: %s.", p_path));
|
|
|
|
|
|
#ifdef TOOLS_ENABLED
|
|
#ifdef TOOLS_ENABLED
|
|
Ref<FileAccess> file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
|
|
Ref<FileAccess> file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES);
|
|
@@ -348,14 +348,14 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
|
|
if (r_error) {
|
|
if (r_error) {
|
|
*r_error = ERR_FILE_NOT_FOUND;
|
|
*r_error = ERR_FILE_NOT_FOUND;
|
|
}
|
|
}
|
|
- ERR_FAIL_V_MSG(Ref<Resource>(), vformat("Resource file not found: %s (expected type: %s)", p_path, p_type_hint));
|
|
|
|
|
|
+ ERR_FAIL_V_MSG(Ref<Resource>(), vformat("Resource file not found: %s (expected type: %s)", p_path, !p_type_hint.is_empty() ? p_type_hint : "unknown"));
|
|
}
|
|
}
|
|
#endif
|
|
#endif
|
|
|
|
|
|
if (r_error) {
|
|
if (r_error) {
|
|
*r_error = ERR_FILE_UNRECOGNIZED;
|
|
*r_error = ERR_FILE_UNRECOGNIZED;
|
|
}
|
|
}
|
|
- ERR_FAIL_V_MSG(Ref<Resource>(), vformat("No loader found for resource: %s (expected type: %s)", p_path, p_type_hint));
|
|
|
|
|
|
+ ERR_FAIL_V_MSG(Ref<Resource>(), vformat("No loader found for resource: %s (expected type: %s)", p_path, !p_type_hint.is_empty() ? p_type_hint : "unknown"));
|
|
}
|
|
}
|
|
|
|
|
|
// This implementation must allow re-entrancy for a task that started awaiting in a deeper stack frame.
|
|
// This implementation must allow re-entrancy for a task that started awaiting in a deeper stack frame.
|