Back to API Reference
Enum

UniTextDirty

Which stage of the text pipeline a change invalidates. Each flag names the coarsest work that must rerun; higher stages subsume every cheaper one below. SetDirty re-enters the pipeline at the coarsest flag set, so pick the least expensive stage that still captures the change.

public static readonly UniTextDirty None = 0

No rebuild needed.

public static readonly UniTextDirty Mesh = 1 << 0

Rebuild the mesh (vertices, UVs, colours, indices) from cached glyph positions. The cheapest stage.

public static readonly UniTextDirty Positions = 1 << 1

Re-place glyphs within their existing line breaks — alignment, justification, vertical metrics.

public static readonly UniTextDirty Layout = 1 << 2

Re-break lines and reflow. Font-size changes live here: they alter advances, so lines recompute.

public static readonly UniTextDirty Text = 1 << 3

Re-parse and re-shape: the text content changed.

public static readonly UniTextDirty Font = 1 << 4

Font asset changed. Resets the font provider and mesh generator, then fully rebuilds.

public static readonly UniTextDirty Direction = 1 << 5

Base text direction changed.

public static readonly UniTextDirty FullRebuild = Text | Font | Direction

Text, font, or direction changed — a full re-parse and reshape.

public static readonly UniTextDirty All = Mesh | Positions | Layout | FullRebuild

Everything needs rebuilding.