Documentation

Unity Engine

Unity Engine

GetVertexAttributeFormat(VertexAttribute)

Gets the format of a given vertex attribute in the MeshData.
Read time 1 minuteLast updated a day ago

Definition

public VertexAttributeFormat GetVertexAttributeFormat(VertexAttribute attr)

Parameters

The vertex attribute to check the format of.

Returns

Type

Description

VertexAttributeFormatReturns the format of the given vertex attribute.

Remarks

Most vertex attributes have a standard data format. For example, a position is a Vector3. Some vertex attributes have more than one possible data format. For example, Mesh.colors32 and Mesh.colors are different formats for vertex colors. Use this function to query the format of a given vertex attribute. Additional Resources: Mesh.GetVertexAttributeFormat, HasVertexAttribute, GetVertexAttributeDimension.