- Home /
The question is answered, right answer was accepted
identifying a tile on a tilemap
In my scene I have a tilemap, and I access it from an unrelated script with
private Tilemap tilemap = GameObject.Find("Tilemap1").GetComponent();
And once I have it, I need to find out what is the sprite name used for a certain tile (that's the only identificator), given the coordinates. What should I write after tilemap.GetTile(position).? Cannot find it in Unity manual or API, nor in youtube tilemap tutorials :( Is there really no way? Maybe then I could set up some other identificators to check in the script later?
Answer by RisheelK · Feb 14, 2018 at 05:17 AM
You can simply write your own class with public variable with public fields with position and name of the tile or you can call method which will return the details.