Unity iOS Build size is way big

左心房为你撑大大i 提交于 2019-11-28 05:43:52

问题


Currently I'm on the verge of making a 2D puzzle game for iOS. When I zip my project it's size become 16MB approximately. When I build it in xcode the project size become 780MB and when I archive it then it becomes 1.5GB.

But the real problem begins when I upload it to test flight for internal and external testing then in iTunes connect it's compressed size became 143MB and Universal install size become 285MB and for different iPhone install size become 160MB in average. Now I think 160MB is very large install file for a simple 2D puzzle game and can cause major drop outs when I publish it.

Unity version: 5.4.2

Scripting backend : IL2CPP

Api compatibility Level: .Net 2.0 subnet

Can anyone tell me what can I do to solve this problem, or the size will reduce when I'll publish it.

Thanks in advance.


回答1:


To solve that (My app was 1.7 GB for iOS, while Android's apk file is just 50 MB) I changed the compression method for Unity build:

Build Settings -> Compression Method -> LZ4HC

Now it is just ~80MB (instead of 1.7 GB). Hope it helps someone.




回答2:


This is my checklist for reducing file size of APK I guess it applies to iOS.

  1. Removing duplicate or unused assets
  2. Reducing sprite sizes (power of 4 for iOS)
  3. Reducing SFX sample rate and bit rate (mono, vorbis, 44100)
  4. Using Texture Compression for sprites (16 bit is better. and disable mipmaps)
  5. Removing external assemblies (and most of .NET references)
  6. Using pngopt to strip out the unnecessary informations from PNG files


来源:https://stackoverflow.com/questions/41658456/unity-ios-build-size-is-way-big

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!