Docsv3.20.2
Back to API Reference
Class

UnionModifier

sealed
Inherits:BaseModifier

Draws the overlapping letters of a range as one shape: neighbouring glyphs of one paint layer in the same size and colour, or under one gradient running across them, fill, stroke, shade and glow as a single outline, so a stroke does not run across a join and translucent fills, shadows and glows of overlapping letters do not add up.

Remarks

A text that unites at least one pair of glyphs draws with the heavier union variant of the text shader, so apply the modifier where joins or overlaps would show: connected scripts such as Arabic and cursive fonts under a stroke, a translucent fill or a shadow. Glyphs unite only with glyphs this modifier also marks. Colour glyphs, text bent by DeformModifier, texture paint, layers with a LayerBlend other than Normal, Glyph, custom shaders and lit world text under HDRP draw each glyph on its own.
protected override void OnApply()