# DynamicComponentTypeHandle

> A handle to a specific component type, used to access an ArchetypeChunk 's component data in a job.

## Definition

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

```csharp
public struct DynamicComponentTypeHandle
```

## Remarks

Passing a type handle to a job automatically registers the job as a reader or writer of that type, which allows the DOTS safety system to detect potential race conditions between concurrent jobs which access the same component type.

To create a DynamicComponentTypeHandle, use [ComponentSystemBase.GetDynamicComponentTypeHandle](/engine/7000.0/script-reference/unity/entities/componentsystembase/getdynamiccomponenttypehandle.md). While type handles can be created just in time before they're used, it is more efficient to create them once during system creation, cache them in a private field on the system, and incrementally update them with [DynamicComponentTypeHandle.Update](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/update.md) just before use.

If the component type is known at compile time, use [ComponentTypeHandle\<T>](/engine/7000.0/script-reference/unity/entities/componenttypehandle1.md).

## Properties

| Property                                                                                                                | Description                                                     |
| ----------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------- |
| [GlobalSystemVersion](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/globalsystemversion.md) | The global system version for which this handle is valid.       |
| [IsReadOnly](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/isreadonly.md)                   | Reports whether this type handle was created in read-only mode. |

## Methods

| Method                                                                                                        | Description                                                                                                                                                                                                                                 |
| ------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [CopyToReadOnly](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/copytoreadonly.md) | API that allows user-code to fetch chunk component data as read-only (to avoid bumping change versions when unnecessary).                                                                                                                   |
| [ToFixedString](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/tofixedstring.md)   | Returns the formatted FixedString "DynamicComponentTypeHandle\[type\_name\_here]".                                                                                                                                                          |
| [Update](/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle/update.md)                 | When a DynamicComponentTypeHandle is cached by a system across multiple system updates, calling this function inside the system's OnUpdate() method performs the minimal incremental updates necessary to make the type handle safe to use. |
