# SetTile

> Sets a Tile at the given XYZ coordinates of a cell in the Tilemap.

## Definition

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

## SetTile(Vector3Int, TileBase)

Sets a [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).

```csharp
public void SetTile(Vector3Int position, TileBase tile)
```

### Parameters

**** (\[Vector3Int]\(/engine/6000.7/script-reference/unityengine/vector3int)): Position of the Tile on the [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md).**** (\[TileBase]\(/engine/6000.7/script-reference/unityengine/tilemaps/tilebase)): The [Tile](/engine/6000.7/script-reference/unityengine/tilemaps/tile.md) to be placed in the cell.

### Remarks

Refer to Scriptable Tiles and Tilemap for more information.

## SetTile(TileChangeData, bool)

Sets a [Tile](/engine/6000.7/script-reference/unityengine/tilemaps/tile.md) with additional properties at the given XYZ coordinates of a cell in the [Tilemap](/engine/6000.7/script-reference/unityengine/tilemaps/tilemap.md).

```csharp
public void SetTile(TileChangeData tileChangeData, bool ignoreLockFlags)
```

### Parameters

**** (\[TileChangeData]\(/engine/6000.7/script-reference/unityengine/tilemaps/tilechangedata)): The [Tile](/engine/6000.7/script-reference/unityengine/tilemaps/tile.md) with additional properties to be placed in the cell.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Whether to ignore Lock Flags set in the Tile's TileFlags when applying Color and Transform changes from [TileChangeData](/engine/6000.7/script-reference/unityengine/tilemaps/tilechangedata.md).

### Remarks

Refer to Scriptable Tiles and Tilemap for more information.
