# GetUnmanagedSharedComponentData

> Obsolete. Use EntityManager.GetSharedComponent instead.

## Definition

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

## GetUnmanagedSharedComponentData\<T>(Entity)

Obsolete. Use [EntityManager.GetSharedComponent](/engine/7000.0/script-reference/unity/entities/entitymanager/getsharedcomponent.md) instead.

> **Warning:**
>
> **Removed.** Use GetSharedComponent\\\<T\\>
>
> **Upgrade to** [EntityManager.GetSharedComponent](/engine/7000.0/script-reference/unity/entities/entitymanager/getsharedcomponent.md)

```csharp
public T GetUnmanagedSharedComponentData<T>(Entity entity) where T : unmanaged, ISharedComponentData
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The target entity

### Returns

| Type | Description                                                                  |
| ---- | ---------------------------------------------------------------------------- |
| T    | The index of the target entity's value for the shared component of type `T`. |

## GetUnmanagedSharedComponentData\<T>(int)

Obsolete. Use [EntityManager.GetSharedComponent](/engine/7000.0/script-reference/unity/entities/entitymanager/getsharedcomponent.md) instead.

> **Warning:**
>
> **Removed.** Use GetSharedComponent\\\<T\\>
>
> **Upgrade to** [EntityManager.GetSharedComponent](/engine/7000.0/script-reference/unity/entities/entitymanager/getsharedcomponent.md)

```csharp
public T GetUnmanagedSharedComponentData<T>(int sharedComponentIndex) where T : unmanaged, ISharedComponentData
```

### Parameters

**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The index of the shared component in the internal shared component list.

### Returns

| Type | Description                     |
| ---- | ------------------------------- |
| T    | A copy of the shared component. |
