diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-08-22 22:19:08 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2020-08-22 22:19:08 +0200 |
commit | 58ed3037c00912f1f573b8ce0d8efe6f8a50cb67 (patch) | |
tree | 6827ddaa0eb0c65046a88bf81ae6630f07f3bcf6 | |
parent | 2ba96f0dd9ed1cc218b464b0964138c51591dded (diff) |
Improve the resource loading error message to mention the need to import
This is a common pitfall when setting up projects in a headless
environment.
-rw-r--r-- | core/io/resource_loader.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index 534f3e44de..a5c9a78c93 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -195,7 +195,8 @@ RES ResourceLoader::_load(const String &p_path, const String &p_original_path, c return res; } - ERR_FAIL_COND_V_MSG(found, RES(), "Failed loading resource: " + p_path + "."); + ERR_FAIL_COND_V_MSG(found, RES(), + vformat("Failed loading resource: %s. Make sure resources have been imported by opening the project in the editor at least once.", p_path)); #ifdef TOOLS_ENABLED FileAccessRef file_check = FileAccess::create(FileAccess::ACCESS_RESOURCES); |