Back to API Reference
Struct

UniTextRenderData

sealed

Raw geometry slice describing a single text/color/sub-mesh render segment.

Remarks

Holds references to pooled vertex/UV/color/index arrays plus offset+count into them. The consumer (canvas: UpdateSubMeshes; world: UniTextWorldBatcher) does whatever it needs with this data — either uploads into a reusable Mesh for CanvasRenderer, or copies into its combined-mesh buffers for world-space batching. Array references are valid only until the next collect cycle on the same generator — pooled buffers can be returned or regrown. Consumers must read/copy immediately and not retain references across frames.
public int fontId

The font identifier this render data belongs to.

public Material materialOverride

Optional custom material. When, the renderer uses the default SDF/MSDF or color material for this fontId.

public GlyphAtlas atlasOverride

Optional atlas binding for materialOverride. When, the custom material keeps its own texture and does not follow atlas replacements.

public int sequence

The single draw-order axis — the emitting layer's LayerSequence (style-stack position). Every segment (base SDF runs, color, paint-layer sub-meshes, inline media, custom materials) sorts by this, so stacking follows the order layers appear in Styles. The base text / default fill sits at DefaultFillSequence (bottom).

public int sortIndex

Stable sort key within the same sequence (lower renders first).

public LayerBlend blend

How this draw composites its premultiplied output with the rendered backdrop.

public Vector3[] vertices

Vertex positions array (pooled). Read [vertexOffset, vertexOffset+vertexCount).

public Vector4[] uvs0

UV0 array (pooled). Must always be valid when vertexCount > 0.

public Vector4[] uvs1

UV1 array (pooled). or ignored when hasUv1 is false.

public Vector4[] uvs2

UV2 array (pooled). or ignored when hasUv2 is false.

public Vector4[] uvs3

UV3 array (pooled). or ignored when hasUv3 is false.

public Color32[] colors

Vertex colors array (pooled).

public int[] triangles

Triangle indices array (pooled). Indices are relative to vertexOffset — they index into this segment's vertex slice, not into the whole vertices array. Read [triangleOffset, triangleOffset+triangleCount).

public int vertexOffset

Start index in vertices/uvs0/colors etc.

public int vertexCount

Number of vertices in this segment (starting at vertexOffset).

public int triangleOffset

Start index in triangles.

public int triangleCount

Number of triangle indices in this segment.

public bool hasUv1

When, uvs1 is valid and should be uploaded.

public bool hasUv2

When, uvs2 is valid and should be uploaded.

public bool hasUv3

When, uvs3 is valid and should be uploaded.