I’m doing a little prototype with the Unity Tilemap system (using a hex grid). I wanted a highlight effect when the user moves his mover a Tile and thought the easiest way would be to just layer another Tilemap over the ground.
So when the user moves his mouse over a Tile I simply need to:
a) Remove the TileBase from the previous Tile (if any) b) Set the TileBase on the new Tile
Problem is that Tilemap doesn’t have a ClearTile or RemoveTile method. It has a ClearAllTiles() method but that does some extra things I’d like to avoid, also it might not be applicable to use in all scenarios.
What works is calling SetTile with null like so SetTile(position, null). Now the documentation says nothing about this… All it says is
Sets a tile at the given XYZ coordinates of a cell in the tile map.
So I’m wondering if the is the “correct” way to do it or if there’s something I’m missing?