Hi everyone. How i can get node reference for child node what was just created with add_child() ? Why it simply don't return added child node ? It will be easier, why it must return void instead ?
add_child()
add_child doesn't create a node, it adds one passed as argument, so you'll already have a reference to that node (the first argument) :)
add_child
ex:
add_child(my_node)
@Shin-NiL said: add_child doesn't create a node, it adds one passed as argument, so you'll already have a reference to that node (the first argument) :) ex: add_child(my_node)
@Shin-NiL said: add_child doesn't create a node, it adds one passed as argument, so you'll already have a reference to that node (the first argument) :)
So add_child does not create node but only add it to tree and instance of node is actualy created with scene.instance() ? ... Damn, Docs really need refit :)