# GetRefRO(Entity)

> Gets a safe reference to the component data.

## Definition

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

```csharp
public RefRO<T> GetRefRO(Entity entity)
```

### Parameters

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

### Returns

| Type                                                                  | Description                                                                                         |
| --------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| [RefRO\<T>](/engine/7000.0/script-reference/unity/entities/refro1.md) | Returns a safe reference to the component data. Throws an exception if the component doesn't exist. |
