Back to API Reference
Class
BaseLineModifier
abstract
Inherits:BaseModifier
Base class for modifiers that render horizontal lines across text (underline, strikethrough).
Remarks
Subclasses define the vertical offset of the line relative to the baseline. Lines break across wrapped text lines automatically. Decoration quads run through the standard UniTextMeshGenerator.onGlyph pipeline with UniTextMeshGenerator.isVirtualGlyph set, so per-glyph modifiers (color, gradient, outline, shadow) apply uniformly to face glyphs and decoration lines. An overlay range raises that whole stack — the line and every layer applied to it — above the text it crosses, instead of interleaving each layer at its own position in Styles.
Derived Types(2)
Types that inherit from BaseLineModifier.
public IPaintProvider Provider{ get; set }Source of named paint swatches resolved by this decoration line.
public PaintRef Paint{ get; set }Line paint (inline colour or named swatch); the default inherits the text fill. A per-range value overrides it.
public LineStyle Style{ get; set }Line style (solid, double, dotted, dashed, wavy). A per-range value overrides it.
public UnitValue Thickness{ get; set }Line thickness; zero = auto (font metric). A per-range value overrides it.
protected abstract float GetLineOffset(FaceInfo faceInfo, float scale)Returns the line's signed distance from the baseline, in mesh-local units, for the metrics of the text's primary font.
The previous paint resolution must reset before the re-run OnApply.
protected override void OnApply(in RangeApplyContext context)protected PooledArrayAttribute<byte> flagsAttribute