I add a collection file ‘A’ in collection ‘B’ and change the position of game object which is belong to A collection in B collection, when I restart the defold, the change didn’t work.
Is this a bug? or it is working like this?
That’s just how it works. You can change the position, rotation, and scale of collection ‘A’ inside collection ‘B’, but you can’t move the game objects inside collection ‘A’ (without modifying the original and therefore all instances). I believe the only things you can change per-collection-instance are script properties.
The editor is kind of bad about enforcing and showing these things. Some things, like the transforms, show up in the editor but are wiped on restart, other things, like changing the default animation on a sprite, will actually modify the prototype collection.
Note that if you, say, change the scale of collection ‘A’, that scale will be applied to all the game objects in that collection, if you check it at runtime.
In my opinion they should just not be allowed at all—make those property fields read-only or not show them.
Thank you for bringing this to our attention. We will look into making the behavior more intuitive. Or at least document better what is going on and why.
Agreed, I’d prefer it to be read-only.