Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AdamActual |
Hi all,
I have a custom resource type that contains nested arrays of other custom resource types.
If I assign the root resource to an exported variable in the inspector, it’s serialized in the scene as expected:
[ext_resource type="Script" path="res://custom_2d.gd" id="1_yyxj2"]
[ext_resource type="Resource" uid="uid://ciwcu5po77tou" path="res://test/character-test.myex" id="2_g7hwb"]
[node name="Custom2D" type="Sprite2D" parent="."]
script = ExtResource("1_yyxj2")
_my_resource = ExtResource("2_g7hwb")
However if I drag a subresource of that resource to a different exported variable, it appears to serialize every single subresource of the root resource in the scene itself, including every single variable of those subresources.
Basically along with the above code, I have an entry for every single script class in the children (not just the assigned one), and a sub_resource
entry for every single subresource in the resource (including children of children of the assigned subresource).
Is this expected behaviour, not only that it serializes all subresources, but also that it serializes all variable values of all subresources?
Thanks very much!