Skip to content

Property bindings serialized in a broken way when saving a scene #190

@randomdevpete

Description

@randomdevpete

This issue seems to have been happening since 4.5. Certain properties, instead of preserving the NodePath reference, get serialized in their entirety (like as an entirely new unique node) within the tscn file, causing all kinds of problems. Scenes that are doing this I have to keep fixing up manually after the fact, every time I save the scene the problem happens again.

This is perhaps best explained with a screenshot of the resultant diff:

Image

Here you can see the referenced nodes (and all the nodes it referenced) have been serialized in their entirety here instead of preserving the "../ChickenState" nodepath.

This particularly always seems to happen with arrays exported with @bind.export.array, but only if the object type is one inheriting from Node (for instance I am still able to uses arrays of PackedScene, but other arrays exhibit this problem, and I have had to just stop using them for now). But here I am really not sure why it's applying to this node. One explanation might be that there was a circular reference; the ChickenState node has a property that refers back to this Body.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions