Quantcast
Channel: Questions in topic: "get"
Viewing all articles
Browse latest Browse all 215

Get sprite of Tile

$
0
0
How to get sprite of tile at *x*,*y* position in tilemap? I see only one way: `TileBase.GetTileData()`, but it requires `ITilemap` argument, while i have only `Tilemap`. Maybe there's better solution exists? Tilemap tileMap = gameObj.GetComponent(); TileBase[] tiles; BoundsInt bounds = tileMap.cellBounds; tiles = tileMap.GetTilesBlock(bounds); TileData td = new TileData(); tiles[0].GetTileData(Vector3Int.zero, new ITilemap ???, ref td); //error here

Viewing all articles
Browse latest Browse all 215

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>