Padding

The Padding property represents the padding around the edges of the parent object's Rect Transform. Positive numbers will move the child objects inward and negative numbers will move the child objects outward.

As an example, the following screenshot shows three panels with various padding values applied. The first Panel has no padding, the second panel has a positive padding on all four sides, and the third Panel has positive padding on the left, right, and bottom but a negative padding on the top:

Horizontal Layout Groups Example 2 in the Chapter3Text Scene

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.