Our game doesn’t use any features from neither UI, networking or Analytics, yet these are included in the final builds of the game (screenshot taken from an Android build):
Is there any way to have these removed automatically ? why are they included if we’re not using them?
Ryiah is suggesting that Unity determines if you use them or not via reflection, and will include them if you do.
Which means, you might actually be accessing these libraries without knowing it.
Do note, you don’t have to directly access a class from a library to actually access it. If you happen to access a class that happens to access one of those classes, then it is accessed.
Do note, I do not know if Unity actually does remove the dll if it isn’t necessary. It might not!
With that said though… that’s not the “whole point of modularizing (splitting these into namespaces and dlls)”.
Dll’s have a LOT of uses, namespaces even more (those 2 aren’t the same thing), most of which have nothing to with your use case.
I was actually suggesting that Unity cannot determine it and simply includes all the DLLs. I can’t seem to dig up the exact info that made me suspect that though I did find info on stripping options in the build settings.
If you click “Player Settings” and then open up the collapsed “Other Settings” there is an option for stripping level. Have you set that yet? On my system it was disabled by default.