# GetComponentDataPtrRO

> Provides an unsafe read-only interface to components stored in this chunk.

## Definition

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

## GetComponentDataPtrRO\<T>(ComponentTypeHandle\<T>)

Provides an unsafe read-only interface to components stored in this chunk.

```csharp
public readonly T* GetComponentDataPtrRO<T>(ref ComponentTypeHandle<T> typeHandle) where T : unmanaged, IComponentData
```

### Parameters

**** (\[ComponentTypeHandle\<T>]\(/engine/7000.0/script-reference/unity/entities/componenttypehandle1)): An object containing type and job safety information. To create this object, call [ComponentSystemBase.GetComponentTypeHandle](/engine/7000.0/script-reference/unity/entities/componentsystembase/getcomponenttypehandle.md). Pass the object to a job using a public field you define as part of the job struct.

### Returns

| Type            | Description                                                                                                                     |
| --------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| [\<T>\*](./.md) | A pointer to the component data stored in the chunk. Returns null if the chunk's archetype does not include component type `T`. |

## GetComponentDataPtrRO(DynamicComponentTypeHandle)

Provides an unsafe read-only interface to components stored in this chunk.

```csharp
public readonly void* GetComponentDataPtrRO(ref DynamicComponentTypeHandle typeHandle)
```

### Parameters

**** (\[DynamicComponentTypeHandle]\(/engine/7000.0/script-reference/unity/entities/dynamiccomponenttypehandle)): An object containing type and job safety information. To create this object, call [ComponentSystemBase.GetDynamicComponentTypeHandle](/engine/7000.0/script-reference/unity/entities/componentsystembase/getdynamiccomponenttypehandle.md).

### Returns

| Type                                                         | Description                                                                                                                                                |
| ------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [void\*](https://learn.microsoft.com/dotnet/api/system.void) | A pointer to the component data stored in the chunk. Returns null if the chunk's archetype does not include the component type referenced by `typeHandle`. |
