

Think about any game that uses regularly repeating squares of background, and you'll probably find it uses tilemaps. Some popular games that use this technique are Super Mario Bros, Pacman, Zelda: Link's Awakening, Starcraft, and Sim City 2000. This set of articles covers the basics of creating tile maps using JavaScript and Canvas (although the same high level techniques could be used in any programming language.)īesides the performance gains, tilemaps can also be mapped to a logical grid, which can be used in other ways inside the game logic (for example creating a path-finding graph, or handling collisions) or to create a level editor. This results in performance and memory usage gains - big image files containing entire level maps are not needed, as they are constructed by small images or image fragments multiple times. only if first sprite in Tile Asset is replaced by another or also vice versa, so making a 100% working repro-project might take time I don't have.Tilemaps are a very popular technique in 2D game development, consisting of building the game world or level map out of small, regular-shaped images called tiles. And I'm not exactly sure does it work both ways, i.e. I could file a bug report, but as I haven't made any money out of Unity so far, I've been bit lazy on that department - sorry. temporarily once again, erased by scene change. The same previously mentioned scene change thing happens.Īlso, it's worth noting when using Tile Palette picker on scene tile, it will pick the correct Tile Asset and the scene tile's sprite will change to show asset tile sprite/color. Tricks like renaming the Tile Asset (that is supposed to be blue) will make it turn blue in scene Tilemap, but not permanently. Now load another scene (can be an empty scene) and then load the scene with Tilemap again. Saving the project and scene will occasionally make the tiles in scene turn to show blue color. Hovering mouse over red tile will occasionally change it to blue color. Change Tile Asset sprite (replace red sprite with blue sprite).Īfter this, Tile Palette's changed tile doesn't update. Add these Tile Assets in Tile Palette window to your Tile Palette.

Create two different Tile Assets, one with red sprite, another with green sprite. I still get pretty much the same effect (tested in empty project with only Package Manager): I decided to try the same with 2018.3.9f1. Hi haven't touched this project I was working on since January. Might be that I've understood something incorrectly, but I thought tilemap uses tile assets for the sprites, and tile palette is just sort of intermediary for painting tile assets to tilemap.

which I wouldn't like to do, as I'm probably going to be swapping tile sprites pretty often for a while. Seems like only option is to change the sprite in tile asset, then re-add it to palette, and manually repaint over all the existing tiles. So have I forgotten something or done something incorrectly? Restarting project or re-importing assets didn't seem to help either. But after reload of scene (no matter if I save the project and scene) it's back with first sprite, not with the one that resides in tile assets sprite slot. If I scale the grid object in edit mode, tilemap immediately swaps tile sprite instances on map to correct ones. unless I manually repaint all to-be replaced tiles. Then go back to tile asset and change sprite to some other sprite. Simply put heading of this post is the problem.
