GetVertexAttributeFormat(VertexAttribute)
Get format of a specific vertex data attribute on this Mesh.
Read time 1 minuteLast updated 4 days ago
Definition
- Type: Method
- Namespace: UnityEngine
- Assembly: UnityEngine.CoreModule
public VertexAttributeFormat GetVertexAttributeFormat(VertexAttribute attr)
Parameters
Vertex data attribute to check for.
Returns
Type | Description |
|---|---|
| VertexAttributeFormat | Format of the data attribute. |
Remarks
Meshes usually use a known format for data layout, for example, a normal is a Vector3 by default. But meshes can use different vertex data formats, for example Mesh.colors32 and Mesh.colors set up vertex color in different formats. You can use this function to query this format.
Additional Resources: VertexAttribute, Mesh.HasVertexAttribute, Mesh.GetVertexAttributeDimension, Mesh.GetVertexAttributes.