Why Won't My Sprite Go Transparent?

Hello all,

I am following this tutorial on YouTube to make a starting countdown timer for my game: Unity 5 Tutorial: Countdown (3 2 1 go!) before game starts - C# - YouTube
My problem is that my sprites will not go transparent for anything (they are surrounded by white when I put them into the Canvas < Image).
I made my numbers on Microsoft paint, exported them as a PNG, went to GIMP and gave them an alpha layer, then made them a Sprite in the Unity Inspector once I imported them into my project. I looked at countless links on Google for tips and none of them helped. If you need pictures or want to see the websites I looked at for help, just let me know. Thank you :slight_smile:

Another thing to check, since a lot of people can forget this, make sure your imagine is a .png file, not .jpg as they won't turn transparent, even when transparent in the image editing program of choice.

2 Answers

2

When you look at the image in Gimp does the background look all white or checkered like ths

71083-transpimg.png
This is the way a transparent image should look in your image editor. If it does look like this then next you need to make sure that you set your sprite up correctly in Unity like this

71084-inspector.png
Of course you can play around with “Pixels per Unit” and “Max Size”

@Mavina I took a screenshot on GIMP, look above. :) And no the image is not checkered unless I delete a piece and the alpha layer is exposed.. I think you just gave me some light though!!

As long as you set it as an sprite then Unity cant do much more. Have you checked if the original image file have transparent background? Or is it white there aswell, or is that as soon as the image gets placed in Unity it becomes un-transparent?

@vittu1994 [71085-gimp-transparency.png|71085] yep! I just took this screenshot in GIMP