The editor ignores alpha of imported PNG file

The editor ignores an alpha channel of the attached PNG file. The imported sprite appears all white.
The previous version of the editor imported the same file correctly. The image editors also open this file without problems.

It seems Unity has trouble with alpha in PNG file with 8-bit colormap.

Affected versions: 5.5.2p2, 5.5.2p3, 5.6.0f1.
Previously in 5.5.1 and earlier it worked fine.

Issue #892300.

3000077--223641--finish_layout_tire_mark.png

How is this image imported? for us, i am getting a black background instead of a transparent one.

I just tried opening the file you attached, getting a white background (5.5.2p2)

It depends what color is assigned for these transparent pixels. In this case white background must be transparent.

I got reply from QA:

the question is what is a “next version of unity” ? is it 5.5 future patch release or 5.6 ?

we had the same issue. The fix that worked for us was to convert all PNGs to 32bit PNGs. The fastest way to do that is via image magic on the command line:

convert someImage.png PNG32:someImage.png

With a little bash scripting magic you can easily do that for full folders. On windows I used the new windows bash.

1 Like

I was thinking about making script to solve this, but as Unity QA responded they are aware of this issue, so we will just wait.

The fix should be available around April 5. It is fine for us.

2 Likes

I posted an editor script on that thread that you linked that should take care of it (or at least, be a starting point for creating such an automated script).

Awesome. we will give that a try !