Unity's Tilemap problem, some gaps between tiles.

Hi all.

Unity 2018.3.0b12

So I’m making this small game with Unity Tilemaps and I found that when the Camera moves there are gaps you can see, only when the camera moves and they flicker.

Any way to fix it?

Attached a screenshot and marked some but you can see many of them around.

BTW, the Spritesheet is already as Filter Mode: Point (no filter)

Any help appreciated.

1 Like

Are you using a Sprite Atlas for the sprites? If not, try it, it usually fixes gaps.

5 Likes

If I create an Atlas I would have to recreate the Tile Palette … and I then have to recreate the maps?

No, you shouldn’t have to recreate anything. Just use, Create an Sprite Atlas (in Unity, don’t redo your graphics in an other tool or something) and then point the Sprite Atlas to your sprites. Nothing should change, except that Unity will automatically use the sprites from the Atlas.

17 Likes

Well that worked! Thanks a lot.

Any idea why?

It’s to do with how the edges are handled with ordinary sprites and atlased ones. In the Atlas there is additional padding around the sprites.

5 Likes

Thanks. This worked for me too.

Thank you so much!

Thanks so much!

Thank you very much, this solution still work like a charm.

Nice! I was fixing this in previous versions of Unity (pre 2020) by setting the X and Y grid sizes in the Grid to 0.999 each but this stopped working in v2020 and the sprite atlas method works like a charm. Also, no need to redo any of the scene! I simply created the Sprite Atlas and included the tileset asset in the Objects for Packing field of the new sprite atlas. All grid glitches fixed!

1 Like

Thank you! That saved a lot of my time.

hey I saw your answer but can anybody tell how to do in a detail or some screenshots

@SamTech1712
“can anybody tell how to do in a detail or some screenshots”

Simply google: unity create sprite atlas step by step

And you’ll get several video tutorials that show you how to create a sprite atlas.

What sprites from map box do you pack in the atlas? if it is generated at runtime?

Wow! This worked wonderfully for me. Thank you very much!

i fix problem with creating a new tilemap right behind the broken tiles and when gap appears background tiles fill them up.

That is not a fix and nobody should willingly reduce the performance of their application to do that. All you’re doing is hiding it in the worst possible way.

this helped me :slight_smile:

I made a tool for adding a 1px padding to tile sheets a couple years ago. I made a post here for it, but it never occurred to me to reply to other people’s posts haha. It’s not the flashiest program in the world, but it gets the job done. If you run into any bugs, let me know and I’ll see if I can fix it. GitHub - Vandel212/Unity2DTileSetPaddingExtruder: Takes in a tile set and adds a 1 pixel padding around each tile.