diff options
author | kobewi <kobewi4e@gmail.com> | 2022-11-28 16:19:15 +0100 |
---|---|---|
committer | kobewi <kobewi4e@gmail.com> | 2022-11-28 16:19:15 +0100 |
commit | 076590886888d544047d9fa3918f8c8959b17e8d (patch) | |
tree | 331b31b1021fbc6cc930bac1ffd45e3fa923ecd2 /scene/resources | |
parent | ef090ee6eac429e51b26ea31e7882cc8cdfa2093 (diff) |
Don't break parsing on missing resources
Diffstat (limited to 'scene/resources')
-rw-r--r-- | scene/resources/resource_format_text.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cpp index 8b2b7e118c..354373ef3c 100644 --- a/scene/resources/resource_format_text.cpp +++ b/scene/resources/resource_format_text.cpp @@ -144,6 +144,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R } String id = token.value; + Error err = OK; if (!ignore_resource_parsing) { if (!ext_resources.has(id)) { @@ -163,7 +164,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R error = ERR_FILE_MISSING_DEPENDENCIES; error_text = "[ext_resource] referenced nonexistent resource at: " + path; _printerr(); - return error; + err = error; } else { ResourceLoader::notify_dependency_error(local_path, path, type); } @@ -175,7 +176,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R error = ERR_FILE_MISSING_DEPENDENCIES; error_text = "[ext_resource] referenced non-loaded resource at: " + path; _printerr(); - return error; + err = error; } } else { r_res = Ref<Resource>(); @@ -187,7 +188,7 @@ Error ResourceLoaderText::_parse_ext_resource(VariantParser::Stream *p_stream, R return ERR_PARSE_ERROR; } - return OK; + return err; } Ref<PackedScene> ResourceLoaderText::_parse_node_tag(VariantParser::ResourceParser &parser) { |