Skip to content

Commit

Permalink
Return error when no ResourceFormatLoader found.
Browse files Browse the repository at this point in the history
  • Loading branch information
Summersay415 committed Aug 14, 2024
1 parent 06fbc83 commit 6df3621
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 @@ -280,6 +280,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 6df3621

Please sign in to comment.