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
Duplicating items within the inspector either with CTRL+D or the right click menu does not properly handle references to child nodes whether duplicating a regular tree of nodes or a packed scene.
Have a node with a child, the parent node has a script with an export that references the child node. Duplicate the parent node, and the duplicate will now be referencing the child of the original instead of its own child.
This seems like either unintended behavior or bad UX.
In order to get around this, I tried to pack the node into its own scene, but encountered the same issue. but even when duplicating the object after packing it into its own scene, it would still reference the children of the original.
There are the circular arrows next to the references, so I pressed those and then afterwards I was able to duplicate in the intended way. The problem now though is that when placing a scene from the file system into my active scene, those arrows are activated by default. This once again seems like it must be unintended behavior or otherwise terrible UX.
But even with those workarounds, there are still more problems. When you make a change in the packed scene, those circular arrows come back. The original and the duplicate will still function fine, but if you try and make ANOTHER duplicate of either of them without manually going through and resetting those circular arrows, the references will be messed up again.
So in order to have proper duplication behaviour I have to not only pack anything I want to duplicate into its own scene first, but also manually press the circular arrow on each and every node reference within the editor and then do that againEVERY time I make a change to the packed scene.
Unity handles this by simply copying any non-child references, and then changing child references to be the child of the new duplicate. This is the most intuitive approach and is the best for 99.9% of use cases. I cannot even think of a single situation in which you would want a duplicate to reference the children of the original.
this video pretty much shows the experience of trying to duplicate
Godot.duplicate.glitch.full.mp4
Steps to reproduce
Have a node with a child, the parent node has a script with an export that references the child node. Duplicate the parent node, and the duplicate will now be referencing the child of the original instead of its own child.
Pack the nodes into a scene and load that packed scene into another scene. Then without pressing on the circular arrows of the references, duplicate the packed scene. The duplicate will now be referencing the child of the original instead of its own child.
Press the circular arrows of the references before duplicating and then the duplication will work fine. But then make a change within the packed scene and save it, the circular arrows will be back.
Minimal reproduction project
As this is more of an interface interaction idk if a project is necessary, the video provided shows the core of the problem and the description notes some other situations not shown in the video.
Though I could spend the time to make a project if it's deemed necessary
The text was updated successfully, but these errors were encountered:
Pack the nodes into a scene and load that packed scene into another scene. Then without pressing on the circular arrows of the references, duplicate the packed scene. The duplicate will now be referencing the child of the original instead of its own child.
This seems like a bug at least, where instancing a scene with export references will add overrides (that's the little reset arrow-icon) for all the node exports to specific nodes in this scene instead of the default relative node paths from the instanced scene. Since you can reset them the expected behavior to me would be that they're set to the default relative node paths, just like other exports don't have overrides added when the packed scene is instanced.
Godot version
v4.1.1.stable.mono.official [bd6af8e]
System information
Godot v4.1.1.stable.mono - Windows 10.0.19045 - Vulkan (Forward+) - dedicated NVIDIA GeForce GTX 1060 6GB (NVIDIA; 31.0.15.3623) - AMD Ryzen 5 2600X Six-Core Processor (12 Threads)
Issue description
Duplicating items within the inspector either with CTRL+D or the right click menu does not properly handle references to child nodes whether duplicating a regular tree of nodes or a packed scene.
Have a node with a child, the parent node has a script with an export that references the child node. Duplicate the parent node, and the duplicate will now be referencing the child of the original instead of its own child.
This seems like either unintended behavior or bad UX.
In order to get around this, I tried to pack the node into its own scene, but encountered the same issue. but even when duplicating the object after packing it into its own scene, it would still reference the children of the original.
There are the circular arrows next to the references, so I pressed those and then afterwards I was able to duplicate in the intended way. The problem now though is that when placing a scene from the file system into my active scene, those arrows are activated by default. This once again seems like it must be unintended behavior or otherwise terrible UX.
But even with those workarounds, there are still more problems. When you make a change in the packed scene, those circular arrows come back. The original and the duplicate will still function fine, but if you try and make ANOTHER duplicate of either of them without manually going through and resetting those circular arrows, the references will be messed up again.
So in order to have proper duplication behaviour I have to not only pack anything I want to duplicate into its own scene first, but also manually press the circular arrow on each and every node reference within the editor and then do that again EVERY time I make a change to the packed scene.
Unity handles this by simply copying any non-child references, and then changing child references to be the child of the new duplicate. This is the most intuitive approach and is the best for 99.9% of use cases. I cannot even think of a single situation in which you would want a duplicate to reference the children of the original.
this video pretty much shows the experience of trying to duplicate
Godot.duplicate.glitch.full.mp4
Steps to reproduce
Have a node with a child, the parent node has a script with an export that references the child node. Duplicate the parent node, and the duplicate will now be referencing the child of the original instead of its own child.
Pack the nodes into a scene and load that packed scene into another scene. Then without pressing on the circular arrows of the references, duplicate the packed scene. The duplicate will now be referencing the child of the original instead of its own child.
Press the circular arrows of the references before duplicating and then the duplication will work fine. But then make a change within the packed scene and save it, the circular arrows will be back.
Minimal reproduction project
As this is more of an interface interaction idk if a project is necessary, the video provided shows the core of the problem and the description notes some other situations not shown in the video.
Though I could spend the time to make a project if it's deemed necessary
The text was updated successfully, but these errors were encountered: