# GetTileEntityIdsFromOffsets(Vector3Int, NativeArray<Vector3Int>, NativeArray<EntityId>)

> Gets an array of EntityIds at an offset from the position and stores them into the given array of EntityIds in the same order.

## Definition

* **Type:** Method
* **Namespace:** [UnityEngine.Tilemaps](/engine/6000.5/script-reference/unityengine/tilemaps.md)
* **Assembly:** UnityEngine.TilemapModule

```csharp
public void GetTileEntityIdsFromOffsets(Vector3Int position, NativeArray<Vector3Int> offsets, NativeArray<EntityId> tileEntityIds)
```

### Parameters

**** (\[Vector3Int]\(/engine/6000.5/script-reference/unityengine/vector3int)): The position on the [Tilemap](/engine/6000.5/script-reference/unityengine/tilemaps/tilemap.md).**** (\[NativeArray\<Vector3Int>]\(/engine/6000.5/script-reference/unity/collections/nativearray1)): Offsets from the `position` on the [Tilemap](/engine/6000.5/script-reference/unityengine/tilemaps/tilemap.md).**** (\[NativeArray\<EntityId>]\(/engine/6000.5/script-reference/unity/collections/nativearray1)): Array to hold the resulting EntityIds.

### Examples

```csharp
using Unity.Collections;
using UnityEngine;
using UnityEngine.Tilemaps;

public static class TilemapExample
{
    public static void GetTileEntityIdFromOffsetsExample(Tilemap tilemap, Vector3Int position, Tile tile)
    {
        int count = 5;
        NativeArray<Vector3Int> offsets = new NativeArray<Vector3Int>(count, Allocator.Temp);
        NativeArray<EntityId> entityIds = new NativeArray<EntityId>(count, Allocator.Temp);
        for (var i = 0; i < count; i++)
        {
            offsets[i] = new Vector3Int(i, 0, 0);
            tilemap.SetTile(position + offsets[i], tile);
        }

        tilemap.GetTileEntityIdsFromOffsets(position, offsets, entityIds);

        for (var i = 0; i < count; i++)
        {
            Debug.Log($"The ids for the Tile placed are equal ({(entityIds[i] == tile.GetEntityId()).ToString()})");    
        }
    }
}
```
