# GetAssignableComponentTypes

> Gets a list of the types of components that can be assigned to the specified component.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Entities](/engine/7000.0/script-reference/unity/entities.md)
* **Assembly:** UnityEngine.EntitiesModule

## GetAssignableComponentTypes(Type, List\<Type>)

Gets a list of the types of components that can be assigned to the specified component.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed Type")]
public List<Type> GetAssignableComponentTypes(Type interfaceType, List<Type> listOut)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): The type to check.**** (\[List\<Type>]\(https\://learn.microsoft.com/dotnet/api/system.collections.generic.list-1)): The list to receive the output.

### Returns

| Type                                                                                    | Description                                                                                       |
| --------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------- |
| [List\<Type>](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1) | The list that was passed in, containing the System.Types that can be assigned to `interfaceType`. |

### Remarks

Assignable components include those with the same compile-time type and those that inherit from the same compile-time type.

## GetAssignableComponentTypes(Type)

Gets a list of the types of components that can be assigned to the specified component.

```csharp
[ExcludeFromBurstCompatTesting("Takes managed Type")]
public List<Type> GetAssignableComponentTypes(Type interfaceType)
```

### Parameters

**** (\[Type]\(https\://learn.microsoft.com/dotnet/api/system.type)): The type to check.

### Returns

| Type                                                                                    | Description                                                                            |
| --------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------- |
| [List\<Type>](https://learn.microsoft.com/dotnet/api/system.collections.generic.list-1) | A new List object containing the System.Types that can be assigned to `interfaceType`. |

### Remarks

Assignable components include those with the same compile-time type and those that inherit from the same compile-time type.
