# ToUIVertices()

> Flattens every sub-mesh into a single list of vertices, for consumers of UIVertex geometry such as custom UI Graphics.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.TextCore.Generation](/engine/6000.7/script-reference/unityengine/textcore/generation.md)
* **Assembly:** UnityEngine.TextCoreTextEngineModule

```csharp
public IList<UIVertex> ToUIVertices()
```

### Returns

| Type                                                                                          | Description                                          |
| --------------------------------------------------------------------------------------------- | ---------------------------------------------------- |
| [IList\<UIVertex>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ilist-1) | The vertices of every sub-mesh, in generation order. |

### Remarks

The per-material split required to correctly render SDF text is not preserved; use [TextMesh.FillMesh](/engine/6000.7/script-reference/unityengine/textcore/generation/textmesh/fillmesh.md) and [\_materials](/engine/6000.7/script-reference/unityengine/textcore/generation/textmesh/materials.md) when it is needed.
