Hi, I am new to Unity. I am creating a simple platform game in which the player will control a mouse character to get all the cheeses in time. I have a function to get all the valid positions in order to spawn the cheese around these tiles. The Tile Rule contains Dirt and Grass tilemap. I use tile.name to check if it is grass or dirt tilemap but it only returns Grass Tile Rule. How can I get the name of the tile in the Tile Rule?
It’s a little unfortunate that this got moved to Getting Started because this is actually a somewhat obscure limitation of the Rule Tile system. You can’t get the name of a rule tile, but you can get the name of the sprite if you feed the cell into TileMap.GetSprite. This means you’ll have to take care with your sprite names, but it’s an option at least.