- Home /
Mobile transparency issue
Hello,
I am developing a small 2d game. When I build the game with iOS or Android, I get this weird transparency issue, it's really bad on Android. I have tried to set different renderer on Android...openGL 3.0 completely hide the transparency...
I have attached 2 screenshots, one to show how it should look like ( it does look like that on MAC ), and what I get on mobiles. It looks like it can't handle such transparency on scaled up sprites, and have a saw edge style for whatever reason.
Thanks for any help you can provide me with.
Try setting the import settings of the texture to true color.
Hey thanks for the quick responses. I set the textures to True Colors and it works :-). Only thing is, it is the most expensive...any way to make it work another way ?
Answer by pako · Mar 14, 2015 at 10:38 AM
It seems the problem is because of the compression settings. Some compression settings don't even support an alpha channel. In the texture import settings select "Advanced" for Texture Type, in order to have more control over the compression settings. Then click on the "Format" drop down and select one of the compression types that support alpha channel (RGBA).
Here's a reference to help you with compression types advantages/disadvantages:
PS You will also need to click "Override for Android" after selecting "Advanced".
Cheers guys, setting to True Colors did the trick ( with making sure only Android and iOS are overriden...however they're the targets ). Do you know if that issue will arise on the Wii U....if so I can just set True Colors for every target ins$$anonymous$$d of just overriding for Android and iOS ?
Click on "Default" in the Import Settings of the texture to apply to all, then override what is not default (if any).
Have you tried any compression settings as I suggested in my answer, ins$$anonymous$$d of True Color? For iOS and Android you should use compression (but with alpha channel since you need it).
I don't know about the Wii as such, but you have control of which compression setting to use for each target device. So you need to do some research on that.
Yeah I tried, after my last comment. Size differences are quite important. i.e : RGBA 32 bits, 1024*1024 texture is 5.1$$anonymous$$B , RGBA DTX5 is 1.3mb, thanks for the tip, I'll need to play nicely with this setting.
Nice to hear it's working for you now.
Please note that it's considered good practice in this forum to accept an answer that has helped you (click the check-mark icon below the down-vote icon). It's also good practice to up-vote the answers and comments that you have found are especially useful.
Your answer
Follow this Question
Related Questions
Non transparent areas of sprites becomes transparent on android 1 Answer
Player duplication when testing on android mobile Matchmaker system 1 Answer
Sprites are being cut in half. HELP! 4 Answers
Create a shader using mask for sprite 1 Answer
Unity 2018 UGUI Android Sprite Textures Not Rendering Correctly 1 Answer