@@ -1815,7 +1815,9 @@ void EditorNode::gather_resources(const Variant &p_variant, List<Ref<Resource>>
18151815 r_list.push_back (res);
18161816 }
18171817 }
1818- gather_resources (v, r_list, p_subresources, p_allow_external);
1818+ if (Object::cast_to<Node>(v) == nullptr ) {
1819+ gather_resources (v, r_list, p_subresources, p_allow_external);
1820+ }
18191821 }
18201822 return ;
18211823 }
@@ -1839,8 +1841,12 @@ void EditorNode::gather_resources(const Variant &p_variant, List<Ref<Resource>>
18391841 r_list.push_back (res_value);
18401842 }
18411843 }
1842- gather_resources (kv.key , r_list, p_subresources, p_allow_external);
1843- gather_resources (kv.value , r_list, p_subresources, p_allow_external);
1844+ if (Object::cast_to<Node>(kv.key ) == nullptr ) {
1845+ gather_resources (kv.key , r_list, p_subresources, p_allow_external);
1846+ }
1847+ if (Object::cast_to<Node>(kv.value ) == nullptr ) {
1848+ gather_resources (kv.value , r_list, p_subresources, p_allow_external);
1849+ }
18441850 }
18451851 return ;
18461852 }
@@ -1855,12 +1861,10 @@ void EditorNode::gather_resources(const Variant &p_variant, List<Ref<Resource>>
18551861
18561862 Variant property_value = p_variant.get (E.name );
18571863 Variant::Type property_type = property_value.get_type ();
1858-
18591864 if (property_type == Variant::ARRAY || property_type == Variant::DICTIONARY) {
18601865 gather_resources (property_value, r_list, p_subresources, p_allow_external);
18611866 continue ;
18621867 }
1863-
18641868 Ref<Resource> res = property_value;
18651869 if (res.is_null ()) {
18661870 continue ;
0 commit comments