# ITilemap

> Class passed onto Tiles when information is queried from the Tiles.

## Definition

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

```csharp
public class ITilemap
```

## Remarks

This handles editor preview tiles when painting on a [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md) in Editor mode.

## Constructors

| Constructor                                                                                                     | Description                                                                                                          |
| --------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |
| [ITilemap(UnityEngine.Tilemaps.Tilemap)](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/ctor.md) | Initializes and returns an instance of [ITilemap](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap.md). |

## Properties

| Property                                                                                    | Description                                                |
| ------------------------------------------------------------------------------------------- | ---------------------------------------------------------- |
| [cellBounds](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/cellbounds.md)   | Returns the boundaries of the Tilemap in cell size.        |
| [localBounds](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/localbounds.md) | Returns the boundaries of the Tilemap in local space size. |
| [origin](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/origin.md)           | The origin of the Tilemap in cell position.                |
| [size](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/size.md)               | The size of the Tilemap in cells.                          |

## Methods

| Method                                                                                                    | Description                                                                                                                                                                                             |
| --------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [GetColor](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/getcolor.md)                     | Gets the color of a Tile given the XYZ coordinates of a cell in the Tilemap.                                                                                                                            |
| [GetComponent](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/getcomponent.md)             | Returns the component of type `T` if the GameObject of the tile map has one attached, null if it doesn't.                                                                                               |
| [GetSprite](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/getsprite.md)                   | Gets the Sprite used in a Tile given the XYZ coordinates of a cell in the Tilemap.                                                                                                                      |
| [GetTile](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/gettile.md)                       | Gets the [Tile](/engine/6000.7/script-reference/unityengine/tilemaps/tile.md) at the given XYZ coordinates of a cell in the [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md). |
| [GetTileEntityId](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/gettileentityid.md)       | Gets the EntityId of the [Tile](/engine/6000.7/script-reference/unityengine/tilemaps/tile.md) at the given xyz coordinates of a cell in the Tilemap.                                                    |
| [GetTileFlags](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/gettileflags.md)             | Gets the Tile Flags of the Tile at the given position.                                                                                                                                                  |
| [GetTransformMatrix](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/gettransformmatrix.md) | Gets the transform matrix of a Tile given the XYZ coordinates of a cell in the Tilemap.                                                                                                                 |
| [RefreshTile](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/refreshtile.md)               | Refreshes a Tile at the given XYZ coordinates of a cell in the :Tilemap.                                                                                                                                |
| [RefreshTiles](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/refreshtiles.md)             | Refreshes Tiles at the given xyz coordinates of cells in the [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md) from the array.                                                 |

## Operators

| Operator                                                                                 | Description                                                                                                                                                                             |
| ---------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [ITilemap](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap/op-implicit.md) | [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md) can be implicitly converted to [ITilemap](/engine/6000.7/script-reference/unityengine/tilemaps/itilemap.md). |
