[ad_1]
Disclaimer: I’m currently just exploring techniques and trying to save literal kilobytes just to see if I can. Please don’t give me speeches about how development time is not worth it.
So I got a bit disappointed that my small game with literally 3MB worth of assets takes 70MB of disk space. It should be lower, right? If I try a WebGL build, it leaves me with 12MBs, so what takes so much on a Windows build?
After that I created a test project just to see what else I can do to get rid of Unity’s default engine bloat as assets are already as optimized as they can be.
Empty project. 0 assets. No code, no textures, no sound, nothing to optimize on my end. One empty scene.
The build weighs 65MBs.
I went into Package Manager and disabled literally everything. All extra packages, all built-in packages. Then went into Project Settings and set highest possible engine code stripping quality.
That left me with 48MB build. Weirdly enough, Unity still left a lot of executables in Managed folder, e.g. the one for Physics, even though it is absolutely not used. I can remove them and the game will still launch without crashing… On that note, I could probably remove the crash handler and save another megabyte… But first, I’d like to see if I can go lower from Unity itself instead of decapitating build once it’s done.
Anyway, what are other ways to actually reduce the filesize? Most articles and questions talk about asset optimization, or focus on WebGL and mobile, where empty builds are actually within sensible values. Any settings I could use or maybe even assets that help with that? I’d appreciate any tips.
Currently worst offenders are:
UnityPlayer.dll (28MB)
mono-2.0-bdwgc.dll (7.5MB)
unity default resources (4.7MB) – do I even need those default resources?
[ad_2]