# HasAttribute<TAttribute>()

> Returns true if the property has any attributes of the given type.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Properties](/engine/6000.5/script-reference/unity/properties.md)
* **Assembly:** UnityEngine.PropertiesModule

## HasAttribute\<T>()

```csharp
public bool HasAttribute<TAttribute>() where TAttribute : Attribute
```

### Returns

| Type                                                          | Description                                                              |
| ------------------------------------------------------------- | ------------------------------------------------------------------------ |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | `true` if the property has the given attribute type; otherwise, `false`. |
