Having some issues with 2d tilemap again.
The tiles will tear (even in prefab editor). The position where it tears depends on where the camera is. (i.e. if i zoom in, the tear will move)
How do I fix that? This happens in game too obviously.
Having some issues with 2d tilemap again.
The tiles will tear (even in prefab editor). The position where it tears depends on where the camera is. (i.e. if i zoom in, the tear will move)
How do I fix that? This happens in game too obviously.
This is a common issue with how Unity handles 2D graphics. It will sometimes grab pixels outside the tile’s area, which results in the gaps appearing.
This video explains the issue well.
You can prevent this by having padding around the tile. For example, if your tile is 32x32 pixels, you could set the cell size to 30x30 in Unity so there’s 1 pixel of “padding” around the tile. That way when Unity goes outside the bounds, it grabs pixels from the “padding” so it appears seamless.
Unfortunately that’s the cleanest solution, as far as I’m aware.