---
title: GetComponentTypes(Entity, AllocatorHandle)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getcomponenttypes
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getcomponenttypes.md
last_updated: 2026-11-10
generated_at: 2026-11-13T00:41:40.304Z
locale: en-us
---

# GetComponentTypes(Entity, AllocatorHandle)

> Gets the component types of an entity.

## Definition

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

```csharp
public static NativeArray<ComponentType> GetComponentTypes(Entity entity, AllocatorManager.AllocatorHandle allocator)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.**** (\[AllocatorHandle]\(/engine/7000.0/script-reference/unity/collections/allocatormanager/allocatorhandle)): The allocator for the returned array.

### Returns

| Type                                                                                             | Description                   |
| ------------------------------------------------------------------------------------------------ | ----------------------------- |
| [NativeArray\<ComponentType>](/engine/7000.0/script-reference/unity/collections/nativearray1.md) | The entity's component types. |

### Remarks

The types come in the order of the entity's archetype, which is stable while the archetype is unchanged.
