Unity Anchors_Pivots - nomrand/__basics GitHub Wiki

RectTransform(UI)

width/height fixed size UI(no stretch or [Anchor]-[Min/Max] no changed)

Anchor = Where to set base of parent point.

  • position = set child & parent endpoint(if set Left-Top, child Left-Top point and parent Left-Top point are same)
  • pivot = set pivot point to endpoint of child(Left-Top/Right-Bottom/Center-Middle/Other...)

images/unity/rect_anchor_fixsize.gif

Stretched UI([Anchor]-[Min/Max] are different)

  • position = set distance of Left/Right or Top/Bottom (size is automatically stretched)
    • height stretched(BottomLine of Preset Window)=set how-far from Top/Bottom Endpoint of parent.
    • width stretched(RightLine of Preset Window)=set how-far from Left/Right Endpoint of parent.
  • pivot = .... same as fixed size UI ....

images/unity/rect_anchor_stretchsize.png