You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We're using packed scenes in a game as a way to save the current state for different parts of the game world.
But it looks like "Editable children" is not properly handled at runtime when loading packed scenes (while it works properly in the editor).
Whenever a scene contains an instance of another scene with "Editable children" enabled, all the child nodes are duplicated in the tree after saving and loading the scene again. One version of them matches the original scene and one version matches the edited instantiated nodes.
Steps to reproduce
Using the minimal repro project:
Run the game. Scene 1 is loaded by default.
Press 2 to save scene 1 and load scene 2.
Press 1 to save scene 2 and load scene 1 again.
Press 2 to save scene 1 and load scene 2 again. Observe new primitives have appeared in the scene.
Open the remote tree tab in the editor and observe duplicated nodes under /root/Scene2/Scene1
In order to reset the saves and start the repro again, you can press R to delete all the saved scenes, otherwise the scene keeps being saved with more and more duplicated nodes.
Godot version
3.3.2.stable, 4.0.dev (0818a46)
System information
Windows 10
Issue description
We're using packed scenes in a game as a way to save the current state for different parts of the game world.
But it looks like "Editable children" is not properly handled at runtime when loading packed scenes (while it works properly in the editor).
Whenever a scene contains an instance of another scene with "Editable children" enabled, all the child nodes are duplicated in the tree after saving and loading the scene again. One version of them matches the original scene and one version matches the edited instantiated nodes.
Steps to reproduce
Using the minimal repro project:
2
to save scene 1 and load scene 2.1
to save scene 2 and load scene 1 again.2
to save scene 1 and load scene 2 again. Observe new primitives have appeared in the scene./root/Scene2/Scene1
In order to reset the saves and start the repro again, you can press
R
to delete all the saved scenes, otherwise the scene keeps being saved with more and more duplicated nodes.Minimal reproduction project
3.x project:
editable-duplicated-nodes.zip
4.0 project:
editable-duplicated-nodes-4.0.zip
The text was updated successfully, but these errors were encountered: