- Home /
How do I replace a tile in TileBase : GetTileData
I have Tile scripts that inherit from TileBase and some of them hold references to each other. When placed, I need to (hopefully immediately) replace the current Tile with said other Tiles based on some environments. Right in the GetTileData method for example.
Is there a way to do so?
Basically I want a custom Tile : Tilebase to act as a holder that can place different Tiles based on different predicates. Right now there doesn't seem to be a way to do this at all. I need to store data other than sprite or colliderType in each individual tile.
Alternatively is there an easier way to store data on each Tile rather than using Dictionary because I can't detect brush events like erasing a tile. (And also because it's absolutely clunky... and it doesn't account for multiple tilemaps. Believe me I tried, and it "works" but not really and totally unscalable.)
Many thanks.
Your answer
Follow this Question
Related Questions
Generating tilemap palettes 0 Answers
tilemap isn't working 0 Answers
How to use the same tilemaps among multiple scenes (e.g. making it a prefab)? 0 Answers
Remove a single tile from a tilemap 1 Answer
What to use for procedural tiles 1 Answer