|Topic was automatically imported from the old Question2Answer platform.
I know about PackedScene and that we get it using
preload()and it works. However, I don’t like to have to provide a path to the file of a scene because I may want to move it at some point. So I tried adding a
class_name and wrote
add_child(ClassName.new()) but only the top-level node appeared in the tree. No children.
Question is, how do I properly instance a scene without using a path to it?