Method to fix lines between tiles without messing with collider

So i noticed that changing the ppu to 31 made the composite collider be weird (when refreshed), and also makes the tiles look bigger. so i found this video on YouTube with and alternative method: How to fix tilemap tearing and edges/gaps in a 2D Unity Project... - YouTube
All you have to do is create a sprite atlas with your tile-maps (create → 2d → sprite atlas). this won’t fix how it looks in the scene and game window when paused. but looks good when playing.
Here is the sprite atlas page in the manual incase you want to see what it actually is:
Unity - Manual: Sprite Atlas

Edit: Had apparently posted the wrong link. changed it to the correct one now.

3 Likes

Alternatively, without a Sprite Atlas, set the Sprite Filter Mode to “Point (no filter)” for all your PixelArt type of sprites (all in this exercise).
image

1 Like

In addition, you can set Cell Gap on the Grid component of Tilemap Grid to (-0.01, -0.01, 0) which will cause all tiles to overlap just the slightest bit. I found that this solved the tearing issue I would sometimes encounter.

Privacy & Terms