Back to API Reference
Class

BaseRangeDecorationModifier

abstract
Inherits:BaseModifier
Implements:IRangeDecorationMeshOwnerIModifierRuleWeightReceiverIModifierCommitChanges

Base class for modifier-authored geometry attached to final visual text ranges. It owns range accumulation, paint resolution, renderer handles and main-thread rebuild timing; subclasses only translate one immutable RangeDecorationContext into a RangeMeshWriter.

Remarks

OnBuildDecoration runs synchronously after final layout. Fragment spans and the writer are borrowed for that call and must not be retained. Vertices, indices and render-key batches are copied into modifier-owned pooled buffers. Modifier apply may run on a rebuild worker, so Unity objects are neither created nor destroyed there. Backend handles are acquired lazily by the writer on the layout commit and released by a post-commit action or by the owning UniText component's main-thread teardown.

Derived Types(1)

Types that inherit from BaseRangeDecorationModifier.

protected IPaintProvider DecorationPaintProvider{ get }

Paint catalog used by ResolveDecorationPaint.

protected bool RequiresExactVisualGlyphs{ get }

Whether this modifier consumes exact final quads through VisualGlyphs.

protected override void OnEnable()
protected override void OnDisable()
protected override void OnDestroy()
protected override void BeforeApply()
protected override void OnApply()
protected virtual void OnDecorationEnable()

Called after the base has subscribed its lifetime and paint receptors.

protected virtual void OnDecorationDisable()

Called before the base detaches its lifetime and paint receptors.

protected virtual void OnDecorationDestroy()

Releases subclass-owned pooled or managed resources.

protected virtual void OnBeforeDecorationApply()

Resets subclass-owned apply-cycle accumulators.

protected virtual void OnDecorationApply()

Observes one worker-side range application after the base has retained its immutable data.

protected virtual void OnPrepareDecorationForParallel()

Caches subclass main-thread state before parallel processing.

protected abstract void OnBuildDecoration()

Builds final geometry for one applied entity segment.

protected RangeDecorationPaint ResolveDecorationPaint()

Resolves an optional leading paint token or the authored field, applies the common projection override chain, and retains any gradient-ramp row until the next decoration rebuild.

protected TextPaint ResolveDecorationPaintSource()

Resolves only the optional leading paint token or authored paint field.

protected RangeDecorationPaint CreateDecorationPaint()

Wraps a resolved paint and its owned ramp row for the geometry writer.

protected void DecorationPresentationChanged()

Reconciles provider subscriptions and invalidates decoration output after presentation changes.