Sprites getting wierd pixels at the sides
http://i.imgur.com/9C0xEZ2.png You can see what I'm talking about in the red marked areas.
The tree consist of 4x7 = 28 Gameobjects (128x224 pixels).
When I put the gameobject together side by side, they have some wierd pixels between them. The way I generated the sprite was by using GetPixel function on a tileset, then using CreateSprite with the textures generated.
Tile = new Texture2D(32,32);
PixelTile = Tileset.GetPixels((int)RoundTile(Width), (int)RoundTile(Height), 32, 32);
Tile.SetPixels(PixelTile);
Tile.filterMode = FilterMode.Point;
Tile.Apply();
go = new GameObject("Tile");
go.transform.position = TileMiddle;
go.AddComponent<SpriteRenderer>().sprite = Sprite.Create(Tile, new Rect(0, 0, Tile.width, Tile.height), new Vector2(0.5f, 0.5f));
I know I can solve it by using a single gameobject instead of multiple ones, but thats a solution I can't do. Does anyone know how to fix this problem? Thanks for the help!
Answer by Keseren · Jan 07, 2016 at 09:37 PM
After trying an alternative solution for 3 hours, then giving up and turning off and on random options, I finally found it!. Its called anti alias, disabling it will remove those wierd pixels.