# HasVertexAttribute(VertexAttribute)

> Checks if a specific vertex data attribute exists on this Mesh.

## Definition

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

```csharp
public bool HasVertexAttribute(VertexAttribute attr)
```

### Parameters

**** (\[VertexAttribute]\(/engine/6000.0/script-reference/unityengine/rendering/vertexattribute)): Vertex data attribute to check for.

### Returns

| Type                                                          | Description                                                |
| ------------------------------------------------------------- | ---------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns true if the data attribute is present in the mesh. |

### Remarks

Most of possible mesh vertex data attributes are optional, for example a mesh might contain only vertex positions, normals and one UV coordinate. HasVertexAttribute check for these attributes will return true in that case, and will return false for all other attributes.

Additional Resources: [VertexAttribute](/engine/6000.0/script-reference/unityengine/rendering/vertexattribute.md), [Mesh.GetVertexAttributeDimension](/engine/6000.0/script-reference/unityengine/mesh/getvertexattributedimension.md), [Mesh.GetVertexAttributes](/engine/6000.0/script-reference/unityengine/mesh/getvertexattributes.md).
