What are instanced children named by Godot?

Godot Version



When I instantiate a scene named Floor and add it to a level with add_child.
What will Godot name the new children? Will it be Floor1, Floor2 etc or are all the instances called Floor?

I want to add floortiles with a marker on them, add a new instance and snap to that marker, over and over.
However I don’t know how to access a Node within a node(Marker) created in runtime.
For one because I don’t know its name.
I’ve tried get_instance_id, or set instance id, but I doesn’t seem to get the syntax right or using it in the wrong way.
I’m a beginner and trying to learn.

i suggest to just append the instantiated node/scene to an Array or Dictionary, dont use name for finding the node.

other way is to add them to a group when instantiated them, then get all by get_tree().get_nodes_in_group("group_name_to_get")

1 Like

Ok, I’ll look into how one goes about adding to an Array. Thank you.