A function to change parent could be useful
Node.change_parent(ParentNode)
There is a workaround to Node.add_child(Node) then Node.quee_free() the old one, but it will loose all its instanced values.
parent_node1.remove_child(child_node)
parent_node2.add_child(child_node)
:)
Also to some extent a duplicate of #1905, so closing.
@akien-mga Ahh.. I knew it there was a dupe :smile:
See also #1943, #1949, #2657 and #3290..
Bottom line, yes adding a helper function to reparent a node would be cool, but it wouldn't automagically solve the above-mentioned issues (just see how many commits the other guys did in their PRs that did not get merged).
Haha. I think the gotcha is most people forget that if you remove the child node you can still access it and move it wherever. What I first thought was if we do remove_child that node is poofed permanently, which isn't the case. We are free to re-parent that sucker wherever we want :D
Maybe something like detach_child would be more informative?
Most helpful comment
Maybe something like
detach_childwould be more informative?