- Mastering UI Development with Unity
- Ashley Godbold
- 156字
- 2021-08-27 18:43:18
Min Width and Height
The Min Width and Min Height properties are the minimum width and height a child object can achieve. If the parent object is scaled down, the child will scale down until it meets its Min Width or Min Height. Once it meets its Min Width or Min Height property, it will no longer scale in that direction.
In the following diagram, the panel has a Horizontal Layout Group component and five child objects. The first child, labeled with a 1, has a Layout Element component with Min Width and Min Height properties set:

You can see that the parent object's Horizontal Layout Group tried to scale all the children down with it as it scaled down itself. The other four children scaled, but since the first child had a Min Width and Min Height property set, it refused to scale down any further.