# AddUnmanagedSharedComponentData<T>(Entity, T)

> Obsolete. Use EntityManager.AddSharedComponent instead.

## Definition

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

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

```csharp
public bool AddUnmanagedSharedComponentData<T>(Entity entity, T componentData) where T : unmanaged, ISharedComponentData
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.**** (T): The shared component value to set.

### Returns

| Type                                                          | Description                                                                                                 |
| ------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| [bool](https://learn.microsoft.com/dotnet/api/system.boolean) | Returns false if the entity already has the shared component. The shared component value is set either way. |
