---
title: HasVertexAttribute(VertexAttribute)
product: Unity Editor
version: '6000.3'
latest_version: '7000.0'
status: This page documents version 6000.3. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/6000.3/script-reference/unityengine/mesh/meshdata/hasvertexattribute
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unityengine/mesh/meshdata/hasvertexattribute.md
last_updated: 2026-09-14
generated_at: 2026-11-08T07:55:37.046Z
locale: en-us
---

# HasVertexAttribute(VertexAttribute)

> Checks if a given vertex attribute exists in the MeshData.

## Definition

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

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

### Parameters

**** (\[VertexAttribute]\(/engine/6000.3/script-reference/unityengine/rendering/vertexattribute)): The vertex 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. Returns false if it is not. |

### Remarks

Most Mesh vertex attributes are optional. For example, a Mesh might contain only vertex positions, normals, and one UV coordinate. Use this method to check whether a given vertex attribute is present in a Mesh. Additional Resources: [Mesh.HasVertexAttribute](/engine/6000.3/script-reference/unityengine/mesh/hasvertexattribute.md), [GetVertexAttributeDimension](/engine/6000.3/script-reference/unityengine/mesh/meshdata/getvertexattributedimension.md), [GetVertexAttributeFormat](/engine/6000.3/script-reference/unityengine/mesh/meshdata/getvertexattributeformat.md), [Mesh.AcquireReadOnlyMeshData](/engine/6000.3/script-reference/unityengine/mesh/acquirereadonlymeshdata.md).
