且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

Unity iOS App尺寸重1.2GB(实际尺寸)(Android 100MB)

更新时间:2022-12-18 09:42:34

iTunes显示安装大小,因此如果您解压缩您的ipa文件,您将获得1.2GB。 Android上的安装大小也可能那么大。你检查过了吗?

iTunes shows the installation size, so if you unzip your ipa file, you will get those 1.2GB. The install size on Android could also that big. Did you check that?

通常当你用真彩色或16位压缩纹理并且拉链压缩效果非常好时(即在具有大量像素的纹理上)会发生这种情况具有相同的颜色。

Usually this happens when you compressed your texture in True Color or 16 bits and the zip compression works really well i.e. on textures that have a lot of pixels with the same colors.

可能的解决方案

1)如果您的纹理没有不需要透明度,你可以切换到压缩纹理(iOS上的PVRTC和Android上的ETC)。但是如果要求透明度,你不应该切换到压缩,因为透明PVRTC看起来很丑陋而且ETC不支持alpha。

1) if your textures don’t require transparency, you could switch to compressed Textures (PVRTC on iOS and ETC on Android). But if the require transparency, you should not switch to compressed because transparent PVRTC can look very ugly and ETC does not support alpha.

2)我不知道是不是可以在你的项目中使用,但你可以尝试通过使用色调或切片来减少纹理量。

2) I don’t know if it is possible in your project, but you could try to reduce the amount of texture by using tint or slicing them.

UPDATE 1

我目前遇到类似的情况,事实证明。

I currently having a similar situation and as it turns out.

 -------------------------------------------- 
| Platform                Android    iOS     |
|--------------------------------------------|
| APK/IPA                 380MB      400 MB  |
| unzipped APK/IPA        1.19 GB    1.13 GB |
| install size on device  380MB      1.15 GB | 
 --------------------------------------------

区别在于 iOS在安装时完全解压缩IPA文件

Android在运行时直接从APK中读取,因此您可能会说,这不是真正安装的,但它绝对是另一种安装类型。

The difference is that iOS unzips the IPA file completely on installation and
Android contrary reads during runtime directly out of the APK, so you could argue, that is not really installed, but it is definitely another installation type.