Unity iOS App Size 重 1.2GB(实际大小)(Android 100MB) [英] Unity iOS App Size weighs 1.2GB (real size) (Android 100MB)

查看:35
本文介绍了Unity iOS App Size 重 1.2GB(实际大小)(Android 100MB)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个应用程序,它是用 Unity 2d 制作的.将其导出到 android,它的重量为 100MB.导出到iOS是1.2GB(ipa是104MB),但是在iTunes里面是1.2GB,太多了.

I have an app, that is made with unity 2d. Exporting it to android it weighs 100MB. Exporting it to iOS weighs 1.2GB (ipa is 104MB), but inside iTunes weighs 1.2GB, which is too much.

我们尝试减小纹理尺寸,但随后图像在设备上变得非常像素化.

We tried to reduce the texture size, but then, images get very pixelated on the device.

关于如何解决这个问题有什么想法吗?

Any ideas on how to fix this?

以下是未压缩的 .ipa 显示的内容:

Here is what the .ipa uncompressed shows what is getting all the MB:

sharedassets4.assets(只是那个文件,获得 342 MB)

sharedassets4.assets (just that file, gets 342 MB)

推荐答案

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 位压缩纹理时,通常会发生这种情况,而 zip 压缩效果非常好,即在具有大量相同颜色像素的纹理上.

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.

更新 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.

这篇关于Unity iOS App Size 重 1.2GB(实际大小)(Android 100MB)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆