🎯 Center vs Middle in Canvas's Rect Transform?

When working with UI frameworks like Unity or web design tools, you’ll often encounter the terms “center” and “middle”. They sound similar, but they refer to different directions — and knowing the distinction can save you layout headaches.

đź§­ The Core Difference

TermRefers ToDirection
CenterHorizontal alignmentLeft ↔ Right
MiddleVertical alignmentTop ↕ Bottom
  • Center = Aligns along the horizontal axis.

  • Middle = Aligns along the vertical axis.


đź§© Real-World Example: Unity Anchor Presets

In Unity’s Rect Transform presets:

  • Choosing “Middle Center” anchors your UI element both vertically and horizontally in the center of its parent.

  • This is ideal for popups, buttons, or any UI element that needs to be perfectly centered.


đź’ˇ Quick Tip

If you're ever unsure:

  • Think “center stage” (left to right)

  • Think “middle row” (top to bottom)

0
Subscribe to my newsletter

Read articles from Sarvesh Kesharwani directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Sarvesh Kesharwani
Sarvesh Kesharwani

I am a Data Engineer from india.