Check the if mouse clicked on specific tile
How could I find out whether a specific tile on my tilemap was clicked? I have a reference to the tile in front of my player Vector3Int currentCell = theMap.WorldToCell(toolPos.position);
. I want to see if this is the tile that has been clicked on. So pseudo-code would look something like:
if(tile clicked == currentCell)
{
//Do something
}
Comment