Docsv2.12.12
Back to API Reference
Class

UniText

Inherits:UniTextBase
Implements:ILayoutController

Canvas-space text component. Renders into a Canvas via CanvasRenderer with full Unicode support — bidirectional scripts (Arabic, Hebrew), complex shaping (Devanagari, Thai), proper line breaking, color emoji, and a markup system via IParseRule.

Remarks

For world-space text (no Canvas), use UniTextWorld.

Nested Types

public IEnumerable<CanvasRenderer> CanvasRenderers{ get }

Gets all canvas renderers used for sub-meshes.

public RectTransform RenderRoot{ get }

Single hidden child holding every render object this component spawns — glyph sub-meshes and inline media. Kept as the first sibling so the text composites below child graphics nested under the component (uGUI draws children over their parent); user children fall after it and highlights still self-order around it ("Behind" before, "Above" after). One node to position instead of each renderer. Main thread only — creates a GameObject.

protected override void UpdateRendering()
protected override void ClearAllRenderers()
protected override void ApplyVisibility()
protected override void OnSetDirty()
protected override void OnDeInit()
public override void SetMaterialDirty()
protected override void OnEnable()
protected override void Sub()
protected override void UnSub()
public override void CrossFadeColor()
public override void CrossFadeAlpha()
protected override void Update()
public override void SetClipRect()

Sets the clipping rectangle for masking, applying to all sub-mesh renderers.

public override void SetClipSoftness()

Sets soft clipping edges for smooth mask transitions on all sub-mesh renderers.

public override void Cull()

Culls against the actual rendered mesh bounds rather than the RectTransform. Glyphs can extend beyond the rect (long words, overflow, outline/glow, modifier transforms), so the default rect-corner test would hide still-visible meshes.

public override void RecalculateMasking()

Recalculates stencil masking, releasing cached stencil materials.

protected override Camera ResolveEventCamera()
protected override void HandleAnimation()