Anchor and Pivot Points
Every UI object has Anchor Handles and a Pivot Point. When used together, they will help ensure that your UI is positioned appropriately and scales appropriately if the resolution or aspect ratio of your game changes.
The Anchor Handles are represented by four triangles in the form of an X, as shown in the following diagram:
Figure 6.27: Anchor Handles and Pivot Points
The Anchors can be in a group together forming a single Anchor, as shown in the preceding diagram, or they can be split into multiple Anchors, as follows:
Figure 6.28: Splitting Anchor Handles
The Anchors will always form a rectangle. So, the sides will always line up.
The Rect Transform has properties for Anchor Min and Anchor Max points. These represent the position of the Anchor Handles relative to the parent’s Rect Transform as percentages. For example, a 0
in an x value moves the handles all the way to the left, and...