Godot Version
4.3 Stable
Question
I have a GridContainer with a specified column count of 2, and I’m dynamically adding multiple TextureRect as children. The problem is that the layout doesn’t update to the 2-column structure when I add children during runtime. Instead, all added children appear in a single column below each other. When I add children before running the scene, the layout respects the 2-column setup as expected.
What I tried
Found in the documentation for Grid Container (but didn’t change anything):
$TheGridContainer.add_child(skinTextureRect)
$TheGridContainer.queue_sort()
Tried Google
Read to all GitHub issues with “Grid Container”
Used the search on forum.godotengine.org