Back to API Reference
Struct

UniTextRenderData

sealed

Raw geometry slice describing a single text/emoji/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 emoji material for this fontId.

public GlyphAtlas atlasOverride

Optional atlas override for materialOverride. When, the renderer uses the default atlas for this fontId.

public RenderOrder order

Render pass this segment belongs to (sorts relative to base text).

public int sortIndex

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

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 the vertices array start (not to vertexOffset). 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.