Back to API Reference
Class

TextHighlightRenderer

abstract

Backend-agnostic view surface for TextHighlighter visuals.

Remarks

Built-in implementations: CanvasHighlightRenderer wraps RangeHighlightGraphic for UniText, while WorldHighlightRenderer wraps a MeshRenderer-based quad mesh for UniTextWorld. A TextHighlighter subclass picks one of these (or a custom subclass) per backend via its CreateHighlightRenderer(UniText,...) / CreateHighlightRenderer(UniTextWorld,...) overloads and drives the result with the same lifecycle regardless of backend.
public Color Color{ get; set }

Solid color applied to every rect. Setting this updates visuals immediately.

public abstract void SetRects()

Replaces the rectangles rendered by this surface. Rects are in text-local space.

public abstract void Clear()

Clears all rectangles. The surface stays alive but draws nothing.

public abstract void Destroy()

Permanently destroys the backing GameObject / resources.