- Home /
How to Stretch objects in grid layout when screen size is changed
So im pretty new to unity and have watched some tutorial videos and decided now that i know a little basics to make some sort of game so im recreating my favorite board game. So for now i have a ui button prefab that im instantiating on a ui panel which has a grid layout group component attached. When the game view is not maximized its fine the tiles are all nicely instantiated next to each other but when i select "maximize on play" or build and run the project i get the weird spacing. How do i make my prefabs auto stretch and adjust ? am i using the wrong layout or is there some option in the component i missed? Thanks in advance for your help and time.
this image is how i need it to be and how it is in the minimized game view ^ how it appears when maximized ^ I have one further image that i am not able to attach because of the 2 attachment limit.... here is the link for the inspector view of My Canvas its child the panel and its child the cardTile prefab: http://imgur.com/sfWM2v8
Your answer
Follow this Question
Related Questions
GridLayout Scaling Issues 1 Answer
Scaling GridLayoutGroup cells for multiple mobile aspect ratios 1 Answer
Why doesn't childing a gameobject to GridLayoutGroup at runtime align it properly? 1 Answer
How do I dynamically update a rect scroll from a List? 0 Answers
Change each cell size based on amount of text in grid layout group 1 Answer