# DrawData

> Mutable view over one generated mesh belonging to the current element.

## Definition

* **Type:** Struct
* **Namespace:** [UnityEngine.UIElements](/engine/6000.7/script-reference/unityengine/uielements.md)
* **Assembly:** UnityEngine.UIElementsModule

```csharp
public readonly ref struct DrawData
```

## Remarks

Slices alias the underlying CPU storage — writes propagate to the GPU at the next upload. Conceptually a mesh, not a draw call: the renderer is free to batch multiple meshes (even from different elements) into a single GPU draw later in the pipeline.

## Properties

| Property                                                                                    | Description                                                                                                                                     |
| ------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| [indices](/engine/6000.7/script-reference/unityengine/uielements/drawdata/indices.md)       | The mesh's indices (triangles, 3 per tri).                                                                                                      |
| [phase](/engine/6000.7/script-reference/unityengine/uielements/drawdata/phase.md)           | The visual phase this draw belongs to.                                                                                                          |
| [renderType](/engine/6000.7/script-reference/unityengine/uielements/drawdata/rendertype.md) | What kind of geometry this draw holds.                                                                                                          |
| [texture](/engine/6000.7/script-reference/unityengine/uielements/drawdata/texture.md)       | The texture sampled by this draw, or `null` for [RenderType.Solid](/engine/6000.7/script-reference/unityengine/uielements/rendertype/solid.md). |
| [userData](/engine/6000.7/script-reference/unityengine/uielements/drawdata/userdata.md)     | User-provided identifier set at draw time via the `userData` parameter of APIs such as `DrawMesh`.                                              |
| [vertices](/engine/6000.7/script-reference/unityengine/uielements/drawdata/vertices.md)     | The mesh's vertices.                                                                                                                            |

## Methods

| Method                                                                                        | Description                                                                                       |
| --------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [GetNormal](/engine/6000.7/script-reference/unityengine/uielements/drawdata/getnormal.md)     | Returns the Normal extras slice. `Vector3` per vertex.                                            |
| [GetTangent](/engine/6000.7/script-reference/unityengine/uielements/drawdata/gettangent.md)   | Returns the Tangent extras slice.                                                                 |
| [GetUv1](/engine/6000.7/script-reference/unityengine/uielements/drawdata/getuv1.md)           | Returns the UV1 (TEXCOORD1) extras slice.                                                         |
| [GetUv2](/engine/6000.7/script-reference/unityengine/uielements/drawdata/getuv2.md)           | Returns the UV2 (TEXCOORD2) extras slice.                                                         |
| [GetUv3](/engine/6000.7/script-reference/unityengine/uielements/drawdata/getuv3.md)           | Returns the UV3 (TEXCOORD3) extras slice.                                                         |
| [SetIndices](/engine/6000.7/script-reference/unityengine/uielements/drawdata/setindices.md)   | Replace this draw's indices.                                                                      |
| [SetMesh](/engine/6000.7/script-reference/unityengine/uielements/drawdata/setmesh.md)         | Replace this draw's entire geometry in a single call: vertices, indices, and all extras channels. |
| [SetNormal](/engine/6000.7/script-reference/unityengine/uielements/drawdata/setnormal.md)     | Replace the Normal extras slice. `Vector3` per vertex.                                            |
| [SetTangent](/engine/6000.7/script-reference/unityengine/uielements/drawdata/settangent.md)   | Replace the Tangent extras slice.                                                                 |
| [SetUv1](/engine/6000.7/script-reference/unityengine/uielements/drawdata/setuv1.md)           | Replace the UV1 (TEXCOORD1) extras slice.                                                         |
| [SetVertices](/engine/6000.7/script-reference/unityengine/uielements/drawdata/setvertices.md) | Replace this draw's vertices.                                                                     |
