UniText
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 ParseRule.
Remarks
Nested Types
public IEnumerable<CanvasRenderer> CanvasRenderers{ get }Gets all canvas renderers used for sub-meshes.
True when ApplyWindowScroll re-places built geometry, so mesh space excludes the window offset.
Gets whether the component currently requires a per-frame tick. Overrides extend the demand with their own per-frame state and call RefreshFrameTick whenever that state changes.
public RectTransform RenderRoot{ get }Holds glyphs, inline media and range decorations in mesh space, below user-authored children; its position applies the document window offset. Main thread only; creates a hidden GameObject.
Applies the alpha of color to the rendering backend; the built mesh carries none. Like ApplyVisibility, it must only change how the built output is drawn — never rebuild it — so a fade costs no layout and no mesh pass.
Applies the red, green and blue of color to the rendering backend. When the latest generation's render data carries them only through its UniTextRenderData.tinted entries, the backend recolours those the way ApplyAlpha fades, without a mesh pass; otherwise it rebuilds the mesh. An override in a subclass of UniText or UniTextWorld calls the base.
protected override void ApplyWindowScroll(Vector2 offset)Re-places the window by moving the render root and the mask stamp root; built meshes stay untouched, except a mask stamp drawn in place, which is rebuilt to move with the content.
protected override void OnSetDirty(UniTextDirty flags)public override void CrossFadeColor(Color targetColor, float duration, bool ignoreTimeScale, bool useAlpha, bool useRGB)Runs the component's per-frame work from Updating while NeedsFrameTick holds. Overrides run their own work after the base call.
public override void SetClipRect(Rect clipRect, bool validRect)Sets the clipping rectangle for masking, applying to all sub-mesh renderers. Mask removal reaches a clippable only through this call (never Cull), so an invalid rect also resets UniTextBase.VisibleWindow and the clip-cull state — otherwise the mesh would stay windowed and culled with no mask to excuse it.
public override void SetClipSoftness(Vector2 clipSoftness)Sets soft clipping edges for smooth mask transitions on all sub-mesh renderers; a content clip's own softness takes their place while it is set.
public override void Cull(Rect clipRect, bool validRect)Culls against the actual rendered mesh bounds rather than the RectTransform (whose corners serve until a mesh exists). Glyphs can extend beyond the rect (long words, overflow, outline/glow, modifier transforms), so the default rect-corner test would hide still-visible meshes.
Restores the effective cull — the union of clip-culling and render suppression — on every culling change, so a direct cull write from outside never lifts a UniTextBase.Hide or scene-visibility state.
protected override Camera ResolveEventCamera(PointerEventData eventData)Resolves the camera to use for screen-to-local conversion based on the event source.
