# GetVertexAttributeFormat(VertexAttribute)

> Gets the format of a given vertex attribute in the MeshData.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine](/engine/6000.3/script-reference/unityengine.md)
* **Assembly:** UnityEngine.CoreModule

```csharp
public VertexAttributeFormat GetVertexAttributeFormat(VertexAttribute attr)
```

### Parameters

**** (\[VertexAttribute]\(/engine/6000.3/script-reference/unityengine/rendering/vertexattribute)): The vertex attribute to check the format of.

### Returns

| Type                                                                                                    | Description                                       |
| ------------------------------------------------------------------------------------------------------- | ------------------------------------------------- |
| [VertexAttributeFormat](/engine/6000.3/script-reference/unityengine/rendering/vertexattributeformat.md) | Returns the format of the given vertex attribute. |

### Remarks

Most vertex attributes have a standard data format. For example, a position is a [Vector3](/engine/6000.3/script-reference/unityengine/vector3.md). Some vertex attributes have more than one possible data format. For example, [Mesh.colors32](/engine/6000.3/script-reference/unityengine/mesh/colors32.md) and [Mesh.colors](/engine/6000.3/script-reference/unityengine/mesh/colors.md) are different formats for vertex colors. Use this function to query the format of a given vertex attribute. Additional Resources: [Mesh.GetVertexAttributeFormat](/engine/6000.3/script-reference/unityengine/mesh/getvertexattributeformat.md), [HasVertexAttribute](/engine/6000.3/script-reference/unityengine/mesh/meshdata/hasvertexattribute.md), [GetVertexAttributeDimension](/engine/6000.3/script-reference/unityengine/mesh/meshdata/getvertexattributedimension.md).
