- Home /
Grid layout not scaled with screen resolution
I have one canvas and canvas have a child panel which is actually scroll view panel contains another child which has component grid layout. Canvas's UI scale mode is scale with screen size. But my Grid layout not fit to screen width, height is perfect.
][1]
Answer by mm-dacampo · Feb 03, 2016 at 03:39 PM
In case of dynamically updated content, use:
myItem.transform.SetParent(grid.transform, false);
The second argument (worldPositionStays) will probably fix your issue...
Otherwise think about using LayoutElement (http://docs.unity3d.com/Manual/script-LayoutElement.html) for your items.
Answer by smkgamespresent · Apr 20 at 06:36 AM
Canvas's UI scale mode should be scale with screen size try to change the resolution to have the better result
add the stretch mode to resize with screen size
Your answer
Follow this Question
Related Questions
GUI co-ordinates bug? 1 Answer
Null exception when drawing a rectangle 1 Answer
JS changing gui box color 1 Answer
Rotating a Rect by the GUI.matrix? 0 Answers
New GUI - Text not rendering in front of geometry if using a Mask 1 Answer