# GetTileEntityIdsFromBlockOffset(Vector3Int, BoundsInt, NativeArray<EntityId>)

> Gets a block 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.6/script-reference/unityengine/tilemaps.md)
* **Assembly:** UnityEngine.TilemapModule

```csharp
public void GetTileEntityIdsFromBlockOffset(Vector3Int position, BoundsInt blockOffset, NativeArray<EntityId> tileEntityIds)
```

### Parameters

**** (\[Vector3Int]\(/engine/6000.6/script-reference/unityengine/vector3int)): The position on the [Tilemap](/engine/6000.6/script-reference/unityengine/tilemaps/tilemap.md).**** (\[BoundsInt]\(/engine/6000.6/script-reference/unityengine/boundsint)): Bounds of the offsets from the `position` on the [Tilemap](/engine/6000.6/script-reference/unityengine/tilemaps/tilemap.md).**** (\[NativeArray\<EntityId>]\(/engine/6000.6/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 GetTileEntityIdFromBlockOffsetsExample(Tilemap tilemap, Vector3Int position, Tile tile)
    {
        int count = 9;
        NativeArray<EntityId> entityIds = new NativeArray<EntityId>(count, Allocator.Temp);
        for (var y = -1; y < 1; y++)
        {
            for (var x = -1; x < 1; x++)
            {
                var offset = new Vector3Int(x, y, 0);
                tilemap.SetTile(position + offset, tile);
            }
        }
        var block = new BoundsInt(new Vector3Int(-1, -1, 0), new Vector3Int(3, 3, 1));
        tilemap.GetTileEntityIdsFromBlockOffset(position, block, entityIds);

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