I have a sprite sheet that has each sprite in a 32x32 pixel area. I am using the Tiled map editor, that exports sprite map data as XML, allowing me to build game maps in that editor. In Unity, I’ve written a script that takes the map XML, and the sprite sheet(s) that is(are) imported, and pieces together a new Texture2D based on the map XML and applies it to a sprite to generate the map and layers, etc.
There’s one issue that I cannot figure out, and it’s this dark line that shows up on the border between a tile, and a transparent space. Here is the image that describes my problem.
I have messed with various import settings already, such as the following:
- Disable mip maps
- Set filtering mode to Point
- Clamp instead of wrap
- Turn off compression, set to RGBA32
- My texture is power of 2
- My texture fits in the size of 4096, it IS 4096.
I’ve also read through this thread which details a problem that sounds very similar to mine, except there is no spare space around the tiles in the sprite sheet to stretch out colors to smooth stuff out, and I’m piecing together the final Texture2D in code.
The last tidbit that I think might be relevant is the fact that when I run in to a non-tile, in the map, e.g. if there’s “nothing” in that area on the layer, I put a blank/clear tile in that spot with Texture2D.SetPixels() with a full Color of Colors.clear.
Thanks in advance for any help!