简体   繁体   中英

Unity assets are dozens of times bigger in build than on disc

I have a 2D game here which i want to release on android and IOS. I'm trying to debug why my build size got much higher for no apparent reason.

Through the Asset Bundle Browser i believe to have a rather accurate description of what textures and animations i have included in my scenes. I do not load anything from Resources etc. everything is included from the start.

All assets summed up take up about 25Mb. The final build size is 173Mb. I am 100% sure that there was a time when the final build size was not that much larger than my asset size.

Through the Editor Log after the building process i tried to debug where the sizes comes from. The build report states that textures make up 99.4%(772.6Mb umcompressed) of my size usage.

After that there is a list of assets sorted by filz size. The first one is a random sprite taking up 10.4mb. However on disc that sprite is 39.3Kb big...

Used Assets and files from the Resources folder, sorted by uncompressed size: 10.4 mb 1.5% Assets/Sprites/MainMenu/MenuScreen/Baum_Minigames_20220612023443.png 10.4 mb 1.5% Assets/Sprites/MainMenu/MenuScreen/Baum_downloads_20220612023444.png 8.8 mb 1.3%

AssetBundleContent In the picture it is visible that the texture are not even close to as big as stated by unity

I am not actually using Asset Bundles but like the browser to get an overview. I cant figure out why everything is so much bigger in the build...

Texture size depends on the selected platform and import settings. The resulting texture is not the same as the one you added to the project. Unity can even use .psd file as texture, but it will be converted to internal formats for the build.

You can find the size of the resulting texture in the preview section in case of Editor is switched to the needed platform.

Make sure you packed your textures to the atlases, then check atlas import settings for the iOS platform. I think it will help you to clarify the situation.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM