# GetSharedComponentDataBoxed(ref DynamicSharedComponentTypeHandle, EntityManager)

> Gets the current value of a shared component.

## Definition

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

## GetSharedComponentDataBoxed(DynamicSharedComponentTypeHandle, EntityManager)

```csharp
public readonly object GetSharedComponentDataBoxed(ref DynamicSharedComponentTypeHandle typeHandle, EntityManager entityManager)
```

### Parameters

**** (\[DynamicSharedComponentTypeHandle]\(/engine/7000.0/script-reference/unity/entities/dynamicsharedcomponenttypehandle)): An object containing type and job safety information. To create this object, call [ComponentSystemBase.GetDynamicSharedComponentTypeHandle](/engine/7000.0/script-reference/unity/entities/componentsystembase/getdynamicsharedcomponenttypehandle.md).**** (\[EntityManager]\(/engine/7000.0/script-reference/unity/entities/entitymanager)): An EntityManager instance.

### Returns

| Type                                                           | Description                 |
| -------------------------------------------------------------- | --------------------------- |
| [Object](https://learn.microsoft.com/dotnet/api/system.object) | The shared component value. |

### Remarks

You cannot call this function inside a job.
