# GetSharedComponentDataIndex<T>(Entity)

> Retrieves the index of the unmanaged shared component data value for an entity.

## Definition

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

> **Warning:**
>
> **Removed.** Use GetSharedComponentIndex\\\<T\\> instead. (RemovedAfter Entities 1.0)
>
> **Upgrade to** [EntityManager.GetSharedComponentIndex](/engine/7000.0/script-reference/unity/entities/entitymanager/getsharedcomponentindex.md)

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

### Parameters

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

### Returns

| Type                                                       | Description                                                                  |
| ---------------------------------------------------------- | ---------------------------------------------------------------------------- |
| [int](https://learn.microsoft.com/dotnet/api/system.int32) | The index of the target entity's value for the shared component of type `T`. |
