You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-11 13:10:58 +00:00
Print error if a resource can't load from script, fixes #15313
This commit is contained in:
@@ -71,7 +71,13 @@ Ref<ResourceInteractiveLoader> _ResourceLoader::load_interactive(const String &p
|
|||||||
|
|
||||||
RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) {
|
RES _ResourceLoader::load(const String &p_path, const String &p_type_hint, bool p_no_cache) {
|
||||||
|
|
||||||
RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache);
|
Error err = OK;
|
||||||
|
RES ret = ResourceLoader::load(p_path, p_type_hint, p_no_cache, &err);
|
||||||
|
|
||||||
|
if (err != OK) {
|
||||||
|
ERR_EXPLAIN("Error loading resource: '" + p_path + "'");
|
||||||
|
ERR_FAIL_COND_V(err != OK, ret);
|
||||||
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user