# GetAttributes

> Returns all attribute of the given type.

## Definition

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

## GetAttributes\<T>()

Returns all attribute of the given type.

```csharp
IEnumerable<TAttribute> GetAttributes<TAttribute>() where TAttribute : Attribute
```

### Returns

| Type                                                                                               | Description                                             |
| -------------------------------------------------------------------------------------------------- | ------------------------------------------------------- |
| [IEnumerable\<T>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | An IEnumerable\_1 for all attributes of the given type. |

## GetAttributes()

Returns all attribute for this property.

```csharp
IEnumerable<Attribute> GetAttributes()
```

### Returns

| Type                                                                                                       | Description                           |
| ---------------------------------------------------------------------------------------------------------- | ------------------------------------- |
| [IEnumerable\<Attribute>](https://learn.microsoft.com/dotnet/api/system.collections.generic.ienumerable-1) | An IEnumerable\_1 for all attributes. |
