Unity with Alpha gallery compression distortion, unityalpha
IOS Atlas compression Distortion
In the Android platform, the UI image is normal, but after it is packaged to iOS, the transparent area will be obviously distorted. After troubleshooting, it is found thatPackage Tag parameter, that is, the image packaged into the gallery. If you use the default Unity compression settingsPVRTC 4 bits for compression, at this point:
Scatter images without Gallery, with transparency, without obvious distortion; images with gallery, with transparency, transparent area distortion will be more obvious:
1. Final strategy:
For small images that need to be gallery, you can choose not to compress and set itTrue color format of RGBA 16;
For scatter images without Gallery, use the default Unity compression method for packaging, that isPVRTC 4 bits 。
2. Modification Operation:
InSelect an image in the Project windowIn the Inspector window, modify the settings as follows:
Since Unity is divided into different versions, the Free version does not compress the RGBA 32 format by default, and the Pro version uses the Compressed format by default. Therefore, you must selectOverride for iOS can take effect, directly modifyThe. meta File may not take effect.
Effect after modification:
Black borders:
. Png image import Unity andChange Texture TypeSprite (2D and UI), and then use an Image component in the UI to display the Image, Black edge appears, for example:
The solution is not difficult.Filter Mode attribute from the defaultModify BilinearPoints (no filter). After modification, the effect is as follows: