Skip to content

Commit

Permalink
Merge pull request #41460 from Calinou/improve-resource-load-fail-mes…
Browse files Browse the repository at this point in the history
…sage

Improve the resource loading error message to mention the need to import
  • Loading branch information
akien-mga authored Sep 3, 2020
2 parents cb20d2b + 58ed303 commit f57ade8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit f57ade8

Please sign in to comment.