godotjs / godotjs/GodotJS

Property bindings serialized in a broken way when saving a scene

Open
#190 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
765
Forks
46
PR merge metrics
No merged PRs in 30d

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.