---
title: GetSharedComponentPtrRO(Entity, ComponentType)
product: Unity Editor
version: '7000.0'
latest_version: '7000.0'
status: This page documents version 7000.0. The latest version is 7000.0.
canonical: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getsharedcomponentptrro
latest_url: https://docs.unity.com/en-us/engine/7000.0/script-reference/unity/entities/globalentitymanager/getsharedcomponentptrro.md
last_updated: 2026-11-10
generated_at: 2026-11-13T08:37:57.273Z
locale: en-us
---

# GetSharedComponentPtrRO(Entity, ComponentType)

> Gets a read-only pointer to the value of a shared component of an entity.

## Definition

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

```csharp
public static void* GetSharedComponentPtrRO(Entity entity, ComponentType type)
```

### Parameters

**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The entity.**** (\[ComponentType]\(/engine/7000.0/script-reference/unity/entities/componenttype)): An [ISharedComponentData](/engine/7000.0/script-reference/unity/entities/isharedcomponentdata.md) type.

### Returns

| Type                                                         | Description                                           |
| ------------------------------------------------------------ | ----------------------------------------------------- |
| [void\*](https://learn.microsoft.com/dotnet/api/system.void) | A pointer to the value, which must not be written to. |

### Remarks

The value is [TypeManager.TypeInfo.TypeSize](/engine/7000.0/script-reference/unity/entities/typemanager/typeinfo/typesize.md) bytes long, and is shared by every entity with the same value in the entity's world. The pointer is invalid after the next structural change in that world.
