And if I change the zoom on the camera or on in the scene the lines change… I am not sure exactly how to fix this, but I do remember that in a previous version there was a similar bug like this.
Often just changing it to point helps as
Point filtering - texture pixels become blocky up close.
Bilinear filtering - texture samples are averaged,
but I think that this is something else.
I tried turning off anti-aliasing and turning on pixel snap and that fixed it in the game view… for now, but in the scene view, there is a vertical line in between every row…
This is a common problem in making 2d tile based games. It isn’t Unity specific and the solution is usually to add a pixel bleed around the edge of each sprite in your spritesheet.
What fixed it for me was going into the Package Manager and enabling ‘2D Pixel Perfect’. 2D Pixel Perfect gives you a Pixel Perfect Camera script which you can add to any rendering cameras, fixing the tile tearing.
When you import your image, set your pixels per unit to one pixel lower than the actual ppu. This will create an automatic bleed that forces your tiles to overlap and removes the lines.
The cause of this is that you end up seeing some of the next tile in the map as you move.
Because of this, always try to pad your tiles with an extra pixel around the edges that blends well.
Hey, I may be a year late to this comment but I wanted to say thanks! It worked perfectly, and reading the other comments I was worried that I would have to redo all of my sprites xD
A simple fix for the tilemap tearing is: 1. Create a new material 2. Set material shader to “Sprites/Default” 3. Check “Pixel snap” 4. Assign the material to the Tilemap Renderer Material slot for each tilemap
I’ve just picked up unity/programming less than a week ago and I dont even understand what you guys are saying but this guy seems to have the most painless and quick fix one could want!: