Hi! I am trying to optimize my game. I have read this link:
The biggest culprit for my file size is the DLLs. It takes up 45% of my space in the game! However, I do not know how to reduce the DLLs size. The manual says to avoid using System.dll. I have no clue what this is. However, in my Editor Log, it says I have used System.dll. So what is System.dll and how do I reduce my DLL size?
Ummm… System.dll is part of the core .net framework.
It combined with mscorlib.dll makes up the main feature sets of .net/mono.
If you navigate to:
C:\Program Files (x86)\Unity\Editor\Data\Mono\lib\mono\2.0\
And decompile System.dll with something like JetBrains dotPeek, you’ll see what’s in it. Things like some of the generic collections like Stack, System.Net, System.Timers, and other stuff are in there.
It’s only 1.6 megs in size, so not super big… I mean if this is the size killer for your app, your app must be like 4 megs in size… in which case? What? are you releasing this on floppy disk for Win95???
Note, the dll’s are important… it’s where the code of you project resides.
Like, reading about average smartphone app sizes, it puts it at more like 25 to 50 megs… which honestly isn’t much in my book (most phones have gigs worth of storage space). 1.6 megs is less than 5% of the smaller side of that.
I am developing for android games and the size of my game is 44.20 MBs. So if the dlls are not supposed to take so much space, how come it takes 45%? I am seriously confused.
I’m like looking at some of my games, and the dll’s take up an average of 10 MB, and this includes things like my massive spacepuppy framework.
Either way… System.dll is only 1.6 MB, what real big difference are we talking about with 42.6 megs vs 44.2. You’re in the normal app size range… I’d think 44.2 megs is perfectly fine.
I have noticed that no one has mentioned this. Why are you worrying about a 40MB game? Unless its simply an empty scene than 40MB is nothing. There are many Android games taking up at least a GB. (Obviously not to say that yours should)
You have enough wiggle room to not worry.
It sounds like OP is comparing how much physical disk space his built game takes up with how much virtual memory it uses while running. These are not the same thing.
This is because my game is incredibly small. There are only seven short levels in it. Even if I release my game, I might want to update it later. I want to optimize my game as much because if I add more additions in updates, I don’t want my storage area to increase a lot. Also, I think it is a good habit to optimize games and a skill I want to do in the future, but I don’t really know it very well. Finally, games that are bigger and better than mine also take up less storage space too.
These games are much bigger than mine with more levels and stuff. However, I have more MB than them. Something tells me that I am doing something wrong.
Well considering that the dll’s are NOT taking up 45% of your install size, and you’ve been misreading your stats… as really it’s your virtual memory footprint that is being taken up 45% of by dll’s, of a whopping 8.7MB of virtual memory… the dll’s aren’t the storage space hog you originally anticipated.
The virtual memory footprint is how much memory is taken up when the actual program is loaded into memory.
Furthermore… the image you posted is not the managed folder of your game install, but the managed folder of your Unity install directory. Note how my pic is a folder hiearchy for my game ‘HowNowSeaCow’… and NOT C:\Program Files\Unity\Editor.
When I do my build, I go to the console and click the editor log option. It opens up note pad which shows these desriptioins. It was described in the manual in the “Reducing File Size of Build”