# FromEntityId(EntityId)

> Creates a reference to the object with the given EntityId.

## Definition

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

```csharp
public static UnityObjectRef<T> FromEntityId(EntityId entityId)
```

### Parameters

**** (EntityId): The EntityId of the object to reference.

### Returns

| Type                                                                                    | Description                              |
| --------------------------------------------------------------------------------------- | ---------------------------------------- |
| [UnityObjectRef\<T>](/engine/7000.0/script-reference/unity/entities/unityobjectref1.md) | A UnityObjectRef referencing the object. |
