Search code examples
c#unity-game-engineunityscript

Unity 5 2d random black lines


I am having some trouble with rendering sprites in Unity, now before anything I have searched around on google and all the answers haven't worked for me, so here is my problem.

I have a tilesheet which has sprites at the size of 16 by 16, the settings for this image is

Sprites (2D and UI)
Multiple
25 Pixels per unit
Generate Mip Maps off/on (tried both)
Filter mode point

I created myself a gameobject. This gameobject simply had a sprite render to of course show a sprite and a custom material for lighting,

The material settings are

Sprites/Diffuse
Tiling X:1 Y:1
Offset X:0 Y:0
Tint : #CCC
Pixel Snap : True

Now the image below is the out come, if you look very closely you can see there is a random line on the left hand side and one in the middle, it just looks like a few random colours from a sprite.

enter image description here

Now if I change my material from Sprites/Diffuse to Sprites/Default my lighting no longer works but my sprites become perfect as you can see

enter image description here

Can anyone please give me a hand with this. If you need anymore information please just let me know


Solution

  • I found a list of solutions here

    http://forum.unity3d.com/threads/tile-map-tearing-problems.225777/#post-1507246

    I just followed the Extrusion one and it works fine now, but it does seem like a little hack :(