Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | wetbadger |
Let’s say I have an orphaned node, and I want to give it parents. Is there a way to do that from inside the orphaned node?
func foo():
if !is_inside_tree():
var root = get_tree().get_root() #get_tree returns null
root.add_child(self)