Godot Engine – Multi-platform 2D and 3D game engine
Do not parse nodes in embedded scene if `_bundled` is present
Leandro (cerberus1746) Benedet Garcia5bea8bd80553
diff --git a/scene/resources/resource_format_text.cpp b/scene/resources/resource_format_text.cppindex 1a8ac9ade93..237430d76aa 100644--- a/scene/resources/resource_format_text.cpp+++ b/scene/resources/resource_format_text.cpp@@ -618,6 +618,7 @@ Error ResourceLoaderText::load() {Dictionary missing_resource_properties;+ bool has_bundled = false;while (true) {String assign;Variant value;@@ -626,6 +627,11 @@ Error ResourceLoaderText::load() {ERR_FAIL_COND_V_MSG(error, error, _get_error_string());+ // We check if _bundled is in the embedded scene to provide backwards compatibility.+ if (assign == "_bundled") {+ has_bundled = true;+ }+if (!assign.is_empty()) {if (do_assign) {bool set_valid = true;@@ -670,9 +676,8 @@ Error ResourceLoaderText::load() {res->set(assign, value);}}- //it's assignment} else if (!next_tag.name.is_empty()) {- if (type == "PackedScene" && next_tag.name == "node") {+ if (type == "PackedScene" && !has_bundled && next_tag.name == "node") {res = _parse_node_tag(res, rp);}