Attention | Topic was automatically imported from the old Question2Answer platform. | |
Asked By | eod |
Maybe CenterContainer doesn’t work this way, but here’s what I’m trying to do:
I have a scene with a CenterContainer
set with a min size (300px by 100px).
When the game runs, via gdscript I create a Tilemap
node, which is sized 200px by 100px. I then add_child
this TileMap
node to the CenterContainer
. Instead of the tilemap being centered in the container, it’s left justified.
When I create a Label
via gdscript and add_child
that to the same CenterContainer
it does get centered.
Any thoughts how to get that TileMap
centered?
P.S. I also tried having a MarginContainer
with a left margin of 50px and the TileMap
still is flush to left.