Layout Element

The Layout Element component allows us to specify a range of size values of an object if it is being sized with an automatic layout. If the parent object tries to size it outside of these preferences, the Layout Element will override any sizing information being sent from the parent object.

To add a Layout Element component to a UI object, select Add Component | Layout | Layout Element from within the object's Inspector. The Layout Element has the following properties:

To use these properties, you first select their checkboxes to enable them; boxes will become available so that you can enter your desired values:

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.