Search Unity

Sliced Image and transparent borders

Discussion in 'UGUI & TextMesh Pro' started by ThomasVandenberghe, Dec 3, 2014.

  1. ThomasVandenberghe

    ThomasVandenberghe

    Joined:
    Feb 28, 2014
    Posts:
    22
    Sliced sprites and transparent border don't seem to work well together. Whenever I have a transparent border at any side the image is displayed completely wrong.

    The correct view, a sliced sprite with no full transparency at any side:
    This is also an image: white on white( test_test_test_vlak_border.png ) Screen Shot 2014-12-03 at 14.07.22.png

    Now, if I delete all the pixels at the left border, this results in drawing the sliced sprite wrong:
    This is also an image: white on white( test_test_test_vlak_border.png ) Screen Shot 2014-12-03 at 14.09.36.png

    Now to make it even worse, I could delete all pixels at any side, and this results in the following:
    Screen Shot 2014-12-03 at 14.11.36.png


    Would this be a problem from Unity itself, or should I fix it myself by trimming all images and adding borders in code? This however would be quite a time consuming work to get right. Since padding layout doesn't have float support, I can't use that either.
     
    Last edited: Dec 5, 2014