Is there any reason why the owner is automatically overridden when child node is moved in the tree? #12557
CarpenterBlue
started this conversation in
Engine Core
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use scenes as collections of related logic. After instantiation, I remove the children from the root node and add them to layers. This is necessary because some layers are viewports/canvasgroups.

However, when I do so, the owner is automatically overridden. I honestly fail to see why this is happening. I think I would much prefer if the PackedScene.pack() handled that on it's own, just packing the nodes that have the root node as an ancestor instead of add_child() invalidating this relationship.
Currently, I have to create pseudo owner with metadata.
Wouldn't it be much better if pack() was to recursively pack each descendant of the root node?
Beta Was this translation helpful? Give feedback.
All reactions