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
Derived Types(1)
Types that inherit from SubMeshModifier.
protected abstract Material GetMaterial()Resolves the sub-mesh material. Return null to skip emitting.
protected virtual void OnQuadAppended(int vertexStart, UniTextMeshGenerator gen)Called after a glyph's quad is copied into the sub-mesh buffer. 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).
protected void SetSubMeshUv2(int vertexIndex, Vector4 value)Writes a value into UV2 channel for a vertex in the buffer (auto-allocates channel).
protected void SetSubMeshUv3(int vertexIndex, Vector4 value)Writes a value into UV3 channel for a vertex in the buffer (auto-allocates channel).
protected void SetSubMeshUv2Quad(int vertexStart, Vector4 value)Writes the same value to UV2 for all 4 vertices of a quad (indices [vertexStart..+4)).
protected void SetSubMeshUv3Quad(int vertexStart, Vector4 value)Writes the same value to UV3 for all 4 vertices of a quad (indices [vertexStart..+4)).
protected Color32[] GetSubMeshColors()Direct access to the sub-mesh color buffer for read/write on already-appended vertices.
protected Vector3[] GetSubMeshVertices()Direct access to the sub-mesh vertex buffer for read/write on already-appended vertices.
Expands a 4-vertex quad outward on all sides by delta UV0 units, moving the positions through the quad's own UV0→pixel scale. Uses the same deformation-aware position and UV0 expansion as the main mesh, including the whole-font-pixel rim of the current face's glyph when that face sits on a pixel grid.
