diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index ea7382cfbf..0b900f55dd 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -339,8 +339,8 @@ Ref ResourceLoader::_load(const String &p_path, const String &p_origin } } #endif - ERR_FAIL_COND_V_MSG(found, Ref(), - 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(), vformat("Failed loading resource: %s.", p_path)); #ifdef TOOLS_ENABLED Ref file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES); @@ -348,14 +348,14 @@ Ref ResourceLoader::_load(const String &p_path, const String &p_origin if (r_error) { *r_error = ERR_FILE_NOT_FOUND; } - ERR_FAIL_V_MSG(Ref(), vformat("Resource file not found: %s (expected type: %s)", p_path, p_type_hint)); + ERR_FAIL_V_MSG(Ref(), vformat("Resource file not found: %s (expected type: %s)", p_path, !p_type_hint.is_empty() ? p_type_hint : "unknown")); } #endif if (r_error) { *r_error = ERR_FILE_UNRECOGNIZED; } - ERR_FAIL_V_MSG(Ref(), vformat("No loader found for resource: %s (expected type: %s)", p_path, p_type_hint)); + ERR_FAIL_V_MSG(Ref(), 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.