Version: Unity 6.6 Alpha (6000.6)
LanguageEnglish
  • C#

DrawData

struct in UnityEngine.UIElements

Suggest a change

Success!

Thank you for helping us improve the quality of Unity Documentation. Although we cannot accept all submissions, we do read each suggested change from our users and will make updates where applicable.

Close

Submission failed

For some reason your suggested change could not be submitted. Please <a>try again</a> in a few minutes. And thank you for taking the time to help us improve the quality of Unity Documentation.

Close

Cancel

Description

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

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
indicesThe mesh's indices (triangles, 3 per tri).
phaseThe visual phase this draw belongs to.
renderTypeWhat kind of geometry this draw holds.
texture The texture sampled by this draw, or null for RenderType.Solid.
userData User-provided identifier set at draw time via the userData parameter of APIs such as DrawMesh.
verticesThe mesh's vertices.

Public Methods

Method Description
GetNormal Returns the Normal extras slice. Vector3 per vertex.
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.
SetIndicesReplace this draw's indices.
SetMesh Replace this draw's entire geometry in a single call: vertices, indices, and all extras channels.
SetNormalReplace the Normal extras slice. Vector3 per vertex.
SetTangentReplace the Tangent extras slice.
SetUv1Replace the UV1 (TEXCOORD1) extras slice.
SetVerticesReplace this draw's vertices.