# RemapEntityForPrefab(Entity*, Entity*, int, Entity)

> Remaps the internal Entity references when instantiating a prefab.

## Definition

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

```csharp
public static Entity RemapEntityForPrefab(Entity* remapSrc, Entity* remapDst, int remappingCount, Entity source)
```

### Parameters

**** (\[Entity\*]\(/engine/7000.0/script-reference/unity/entities/entity)): The source array of entity references.**** (\[Entity\*]\(/engine/7000.0/script-reference/unity/entities/entity)): The array of target entities.**** (\[int]\(https\://learn.microsoft.com/dotnet/api/system.int32)): The size of the source and target arrays.**** (\[Entity]\(/engine/7000.0/script-reference/unity/entities/entity)): The source entity to remap.

### Returns

| Type                                                               | Description                                                                                                    |
| ------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------- |
| [Entity](/engine/7000.0/script-reference/unity/entities/entity.md) | If the source Entity is found in the `remapSrc` array, it is remapped. Otherwise, returns the `source` Entity. |
