Allows resizing gameobject by size or scale.
Allow users to change the size of the GameObject.
Allowed resizing directions.
Resize by changing size of the gameobject.
Resize by changing scale of the gameobject.
Allow resize when cursor in the one of the corners. Should be disabled to use together with Rotatable component.
If enabled size is rounded to the integer number. Reason: size can be float number if gameobject is rotated.
Change RectTransform size.
Change LayoutElement size.
Distance from border where resize allowed.
Minimal size in points, for the
Scaletype limits is checked against width * scale.x and height * scale.y.
Vector2Maximum size in points, for the
Scaletype limits is checked against width * scale.x and height * scale.y.Not applied if size is zero.
Keep Aspect Ratio
Aspect ratio applied after MinSize and MaxSize, so if default aspect ratio not equal MinSize and MaxSize aspect ratio then real size may be outside limit with one of the axis.
Target to resize; the self is by default.
Resize Children With Parent¶
There are a few ways to resize children with parent:
RectTransform anchorsto set children size relative to parent with padding from borders.
Probably setting anchors to horizontal stretch (for the labels or buttons) or horizontal and vertical stretch (for the long text or ListView) will be enough.
Video about anchors.
Add Layout Group (
Horizontal Layout Group,
Vertical Layout Group,
Grid Layout Group, EasyLayout) to parent with enabled
Control Child Sizeoptions.
It is a more complex way, and it will be harder to achieve the desired result.
If you want to add/remove/enable/disable children from a script and automatically reposition them after this, then Layout Group is the right way to do this.