Tile script: Check if TileMap is a palette or not?
I've added my own tile script which generates tile based on the surrounding tiles - and that works pretty well. But what I want to do is have it display a different tile in the palette view (with a little "auto" label on), so that I can see that it is the auto-tile and not just a regular tile.
To do this, I need to do something like:
If (tilemap.isPalette){
sprite = previewSprite;
} else {
sprite = autoSprite();
}
But of course, it's not that simple. Does anyone know of a way to tell if the tilemap is part of a palette or not?
Thanks, Adam
Your answer
Follow this Question
Related Questions
TileMap 2D - Automatically placing specific Prefab on Corners 0 Answers
How can I hide tiles inside a tilemap outside of the camera view? 0 Answers
Cant Use just one tile from the Tile Palette? 0 Answers
destructible tilemap, destroying tiles through overlapcircle 1 Answer
Tile pallet doesn't exist in Unity 2019.2.12f1 personal! How to re-enable it? 1 Answer