daniu54 / earie-treasures

A 2d top-down loot-em-up with horror and stealth elements
0 stars 0 forks source link

`Array`-type skript properties are reset when checking out a new scene and building it for the first time #26

Open Abb4 opened 1 year ago

Abb4 commented 1 year ago

I use godots Array<Node2D> to store a collection of nodes. When I assign nodes to the array in the editor the changes are stored in the scene file. But when I delete the cashe files (.godot folder) and rebuild the project, the values previously stored inside the Array<Node2D> are overridden with Nil.

Yes this Nil assignment does create git changes on the scene file. And yes, if you revert the changes using git, the Array is populated again, as it should.

This means, that if somebody else checks out a scene, where I have set up an Array in the editor and builds a project, he will have unintended sneaky git changes to the scene, which if committed, will revert some work that I have done previously.

Other data types like ints respect the scene file and do not reset the values upon building the project.

I want to test this some more and maybe ask godot people on how to fix this issue.

Abb4 commented 12 months ago

Could be similar to https://github.com/godotengine/godot/issues/15371

Maybe the issue is specifically, that before the first build the values are reset