Tips of Reducing the size of Build?
I am making a 2D game in Unity and using a large number of png images as sprites. I have a total of about 1000 png images as sprites and after importing to unity each file has a size of 0.7 MB if I use resolution of 512. After building the total size of the folder becomes around 1.2 GB which is quite huge. Any tips on how to reduce the build size?
Answer by Jason2014 · May 28, 2016 at 02:48 PM
Make every sprite format as "Crunched" and set compression quality to maximum. This will drastically reduce import size. However, you can slightly damage quality, but in a distance this will be completely invisible.
You can try reduce import size too. Look at your game and ask yourself question: "Do I really need that image size?".
Mipmapping selected also increases image size. If you do not know what is it check this: Mipmap
And most important if you really have this huge amount of images, "pack" some of them into one big file. This is a sprite "sheet". In your case when someone have a lot of separated sprites, making them as a single sprite sheet will be better A LOT (at least for much "cleaned" folder). Then you have to check "Multiple" sprite type and separate them as a grid.
Have you any music files when are longer than sounds? Try to reduce them quality. If you have 320kbps for example, reducing them to 256kbps will give no difference but can at least slightly reduce import size. You can use Audacity to this operation.
Thanks this was precisely the reason for the huge build size. Apparently I was using different png images as sprites. When I compiled them all in a single sprite sheet the size reduced drastically.
Your answer
Follow this Question
Related Questions
Texture count in Profiler increasing everytime animation is played 0 Answers
Please advice: what's the best way of saving sprites for random sprites prefabs? 0 Answers
Performance question: Is it better to Instantiate particle systems OR use same particle system? 1 Answer
Startup time of WebGL build 0 Answers
Animation : how to Interrupt an animation sometimes ? 0 Answers