Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


GetTile

Gets the Tile at the given XYZ coordinates of a cell in the Tilemap.
Read time 1 minuteLast updated 6 days ago

Definition

GetTile(Vector3Int)

Gets the Tile at the given XYZ coordinates of a cell in the Tilemap.
public virtual TileBase GetTile(Vector3Int position)

Parameters

position

Position of the Tile on the Tilemap.

Returns

Type

Description

TileBaseTile placed at the cell.

Remarks

Use this method to get the Tile at the given XYZ coordinates of a cell in the Tilemap.

GetTile<T>(Vector3Int)

Gets the Tile of type T at the given XYZ coordinates of a cell in the Tilemap.
public virtual T GetTile<T>(Vector3Int position) where T : TileBase

Parameters

position

Position of the Tile on the Tilemap.

Returns

Type

Description

TTile of type T placed at the cell.

Remarks

Use this method to get the Tile of type T at the given XYZ coordinates of a cell in the Tilemap.