DrawData
Mutable view over one generated mesh belonging to the current element.
Read time 1 minuteLast updated 6 days ago
Definition
- Type: Struct
- Namespace: UnityEngine.UIElements
- Assembly: UnityEngine.UIElementsModule
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 | The mesh's indices (triangles, 3 per tri). |
| phase | The visual phase this draw belongs to. |
| renderType | What kind of geometry this draw holds. |
| texture | The texture sampled by this draw, or |
| userData | User-provided identifier set at draw time via the |
| vertices | The mesh's vertices. |
Methods
Method | Description |
|---|---|
| GetNormal | Returns the Normal extras slice. |
| GetTangent | Returns the Tangent extras slice. |
| GetUv1 | Returns the UV1 (TEXCOORD1) extras slice. |
| GetUv2 | Returns the UV2 (TEXCOORD2) extras slice. |
| GetUv3 | Returns the UV3 (TEXCOORD3) extras slice. |
| SetIndices | Replace this draw's indices. |
| SetMesh | Replace this draw's entire geometry in a single call: vertices, indices, and all extras channels. |
| SetNormal | Replace the Normal extras slice. |
| SetTangent | Replace the Tangent extras slice. |
| SetUv1 | Replace the UV1 (TEXCOORD1) extras slice. |
| SetVertices | Replace this draw's vertices. |