Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | lollornr | |
Old Version | Published before Godot 3 was released. |
get_tree().get_edited_scene_root().get_node(path_to_node) seems not to work!
Can you give some more information about your project? Do you want to create a custom node that adds a node to its parent? Just create the object var foo = Node2D.new()
and then add it whereever you want it in the tree with add_child()
. get_node()
does not add a node it gets an existing node.
umfk | 2016-03-03 16:02
I want to make a plugin in editor that add a child node in the edited scene. I guess there are two trees, one for the editor and one for the edited scene but I can’t access this one.
lollornr | 2016-03-03 21:26