gpt4 book ai didi

unity3d - 如何减少 Unity 包的大小

转载 作者:行者123 更新时间:2023-12-05 03:50:04 26 4
gpt4 key购买 nike

在 Unity 中减少 Android App Bundle 大小的技巧有哪些?

有没有办法在 10MB 以内做到这一点?

我有 33.4MB 的 apk。这是编辑日志:

Build Report
Uncompressed usage by category (Percentages based on user generated assets only):
Textures 1.4 mb 6.8%
Meshes 0.0 kb 0.0%
Animations 102.1 kb 0.5%
Sounds 152.2 kb 0.7%
Shaders 130.5 kb 0.6%
Other Assets 1.8 mb 9.0%
Levels 1.9 mb 9.5%
Scripts 1.0 mb 5.2%
Included DLLs 13.3 mb 66.4%
File headers 270.7 kb 1.3%
Total User Assets 20.0 mb 100.0%
Complete build size 109.4 mb

最佳答案

提示

为了在 Unity 中减少 Android APK 或 App Bundle 的大小,这里有一些提示:

  • 使用 ETC(ETC 或 ETC2)或 DXT 压缩(Crunched RGBA 用于透明图像,RGB 用于纯色背景)压缩图像和纹理
  • 压缩音频文件(在内存中压缩)
  • 从包管理器中删除未使用的包
  • 从 Assets 中删除未使用的插件
  • 从 Assets 中减少资源中的文件

更多信息在这里:https://docs.unity3d.com/Manual/ReducingFilesize.html

Assets 包

我更喜欢使用称为 AssetBundle 的资源包。创建起来很容易,然后将其上传到公共(public)服务器上。最后,在您的 Unity 项目中,您必须下载它、解压缩然后使用它。

AssetsBundle中的所有资源都可以从项目中删除。此解决方案用于 Unity 的 Google Instant App。

更多信息在这里:https://docs.unity3d.com/Manual/AssetBundlesIntro.html

关于unity3d - 如何减少 Unity 包的大小,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/63657292/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com