"Editable Children" of instanced scenes' export variables not updated during duplication
Operating system or device, Godot version, GPU Model and driver (if graphics related): Windows 10 Godot 3.0, commit d5189d2 from Calinou's builds
Issue description:
I added a sub-scene to another scene. I then edited the properties of children in the sub-scene after exposing the children using the "Editable Children" flag. When duplicating the root node of the sub-scene with duplicate()
, default parameters, the generated children, but not the root node that was used to call duplicate()
, were created with initialization values rather than the design-time values assigned.
If the children themselves are duplicated directly, then the values are set properly, but if you duplicate the root of the instanced scene, their children are not updated.
Steps to reproduce:
- Create a scene with a root Node 'parent' and child Node 'child'
- Add a script to 'child' with an exported variable.
- Create a scene with a root Node 'root'. Then add an instance of scene 1 as a child of node 'root'.
- Expose the children of the instanced scene using the "Editable Children" flag.
- Change the value of the 'child' node's exported variable.
- Add a script to the 'root' node. In the ready function, duplicate 'parent' and compare the value of its 'child' node's exported variable to the original's exported value which you explicitly assigned. They will be different.
Link to minimal example project: InstancedSceneDuplicatedExportValueFailureTest.zip
"a" and "b" in this picture are exported bools that default to true
, but have all been manually assigned false
from the editor at design-time.