Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | AgeOfAsparagus |
I have a GridContainer
that gets nodes added to it:
my_container.add_child(node)
And this node appears nicely in the center. However, if I try to add another node:
my_container.add_child(node2)
It also appears right in the center, on top of the first node. If I try to force the container to sort:
queue_sort()
Nothing happens.
How can I get my nodes to show up nicely in a grid container like they do if I put them in there with the editor?
Thanks!
EDIT:
If I add a Button
node this way it seems to work as expected, but if I add a Sprite node, for example, it doesn’t work. Maybe it only works with control nodes?