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.
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 theArray<Node2D>
are overridden withNil
.Yes this
Nil
assignment does create git changes on the scene file. And yes, if you revert the changes using git, theArray
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
int
s 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.