Quick answer: Auto Size + Baseline alignment causes visible vertical jumps when text changes. Disable Auto Size and use a fixed point size, or switch Vertical Alignment to Geometry Center so the rendered glyphs stay visually centered regardless of font metrics.

Here is how to fix Unity TextMeshPro labels whose vertical position appears to jump every time the text changes. A score counter, name plate, or chat bubble bobs up and down by a few pixels with each update. The cause is the interaction between Auto Size (which recomputes point size) and Baseline alignment (which positions based on font metrics that scale with point size).

The Symptom

A TMP label with Auto Size enabled and short fluctuating text (numbers, single words) jiggles vertically as text changes. Long text fills the box and sits low; short text in big size sits visibly higher.

What Causes This

Auto Size + Baseline. When text shrinks, Auto Size raises the point size, which raises the cap height and the ascender extent. With Baseline alignment, the visual top moves up.

Padding extents change. Padding around glyphs is proportional to font size. As size changes, padding shifts the bounds.

Mesh refresh on Set Text. Each text change rebuilds the mesh; small float jitter in the layout can produce visible position changes.

The Fix

Step 1: For stable labels, disable Auto Size. Pick a fixed point size that fits the longest expected text and use it always.

tmp.enableAutoSizing = false;
tmp.fontSize = 36;

Step 2: Use Geometry Center vertical alignment.

tmp.alignment = TextAlignmentOptions.Center;   // horizontal
tmp.verticalAlignment = VerticalAlignmentOptions.Geometry;

Geometry alignment uses the actual rendered glyphs’ bounds rather than the typographic baseline. Visually centered text stays centered regardless of point-size shifts.

Step 3: For Auto Size cases, narrow the range.

tmp.enableAutoSizing = true;
tmp.fontSizeMin = 28;
tmp.fontSizeMax = 36;
tmp.autoSizeTextContainer = false;

An 8-point range produces visible but minor vertical shifts. Wider ranges produce dramatic ones.

Step 4: Pin layout to a parent RectTransform. Place the TMP inside a fixed-size parent. Anchor the TMP to fill the parent. The parent does not move; the text stays inside.

Step 5: Disable Margin contribution. Margins cause additional padding. Set all four margin fields to 0 unless you need them; they add silent vertical offsets.

For Score Counters Specifically

Score counters are particularly noticeable. The fix combines:

“Auto Size + Baseline = vertical bob. Fixed size + Geometry Center = stable label.”

Related Issues

For TMP emoji rendering, see TMP Emoji Sprite Asset. For TMP wrap issues, see TMP Text Not Showing.

Disable Auto Size. Geometry Center. Tabular figures. Counters stop bobbing.