Fitters
There are two fitter layout components. These components make the Rect Transform of the object on which they are attached fit within a specified area.
Content Size Fitter
The Content Size Fitter
component allows you to force the size of the parent to fit around the size of its children. This fitting can be based on the minimum or preferred size of the children.
To add a Content Size Fitter
component to a UI object, select Add Component
| Layout
| Content Size Fitter
from within the object's Inspector
. The Content Size Fitter
component has the following properties:

You can choose the following properties for the Horizontal Fit
and the Vertical Fit
:

If the Unconstrained
property is selected, Content Size Fitter
will not adjust the size of the object along that axis.
If the Min Size
property is selected, the Content Size Fitter
will adjust the size of the object based on the minimum size of the children. This minimum size is determined by the Min Width
and Min Height
properties of the Layout...