- Home /
Trying to scale Grid to Parent RectTransform
I've searched for a few days and have tried numerous ideas, but I can't seem to figure this out. Here is what I have:
I procedurally create two Tilemaps: Walls and Paths
The tilemaps are a children of a gameobject with a Grid component.
The grid gameobject is a child of a gameobject with a RectTransform.
The only thing i have managed to change through the editor to control the appearance after the tilemaps are created is the scale... no other change seems to affect the Grid appearance much.
What I'm trying to accomplish?
Determine which is longer: Tile rows or tile columns
Scale the entire grid until the longer dimension fills the parent gameobject, which currently only contains a RectTransform.
Strangely, this sounds like it should very easy by simply attaching an AspectRatioFitter script to the Grid gameobject, but that seems to have absolutely no affect.
Any suggestions will be greatly appreciated!
Your answer
Follow this Question
Related Questions
Tilemap tiles show one pixel of their left neighbour? 0 Answers
Align Canvas with Hex tilemap 0 Answers
Get mesh to be drawn in front of tilemap 0 Answers