SubMeshModifier
Base class for modifiers that emit a separate, owner-controlled sub-mesh rendered by its own CanvasRenderer with a user-supplied material (see MaterialModifier).
Remarks
ShouldIncludeCurrentGlyph and, when true, the base class copies the face quad (4 verts) from the generator into its own per-atlas buffer (SDF atlas vs emoji atlas are kept separate). onCollectSubMeshes — the base class uploads owned buffers into private Mesh instances and appends up to two entries (text + emoji) to the render-data list, with the material, atlas, order and sort index chosen by the subclass. Compared to EffectModifier, which bakes its duplicates into the same mesh as the face pass, SubMeshModifier keeps its vertices in isolated local buffers because each sub-mesh is bound to a distinct material and CanvasRenderer.protected abstract Material GetMaterialForSlot(Slot slot)Resolves the material for a given slot. Return to skip emitting that slot.
protected virtual GlyphAtlas GetAtlasForSlot()protected virtual RenderOrder GetRenderOrder()Stable sort key within the same RenderOrder group (lower renders first).
protected virtual void OnQuadAppended(Slot slot, int vertexStart, UniTextMeshGenerator gen)Called after a glyph's quad is copied into the slot buffers. Override to write custom UV2/UV3 data for the just-appended four vertices, or to modify colors/positions. The four vertices occupy indices [vertexStart, vertexStart + 4) in the slot buffer identified by slot.
protected Color32[] GetSlotColors()Direct access to the slot color buffer for read/write on already-appended vertices.
protected Vector3[] GetSlotVertices()Direct access to the slot vertex buffer for read/write on already-appended vertices.
Expands a 4-vertex quad outward on all sides by delta em-units. Updates both positions and UV0 in sync so the atlas sample stays aligned. Mirror of ExpandQuad but operates on the sub-mesh slot buffers. No-op for non-positive deltas or when UV0 has not been written yet.
