Skip to content

Commit

Permalink
Return error when no ResourceFormatLoader found.
Browse files Browse the repository at this point in the history
(cherry picked from commit 6df3621)
  • Loading branch information
Summersay415 authored and RandomShaper committed Sep 5, 2024
1 parent 7c0606b commit f4b8ce2
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,10 @@ Ref<Resource> ResourceLoader::_load(const String &p_path, const String &p_origin
return res;
}

if (r_error) {
*r_error = ERR_FILE_UNRECOGNIZED;
}

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));

Expand Down

0 comments on commit f4b8ce2

Please sign in to comment.