Reputation:
I was experimenting in unity with just 2 game objects, no textures and only 40 lines of code, but when I built it to android it was about 17 mb, then I changed the managed stripping level to high and it went down to 11mb, but after that it wouldn't go down even if I deleted every game object and script in the project. what can I do to make it smaller.
Upvotes: 1
Views: 1555
Reputation: 394
You need to build only for one plaform and use L2CPP:
Edit -> Project Settings -> Player -> Configuration
Check only ARMv7.
I can clearly remember building 7mb applications.
Upvotes: 0
Reputation: 617
I think you did everything you need to do, but take in practice to always compress the texture, meshes and animation clips also just put what you need, also care about object's vertices and polygons number. to check the assets contributions in the built file size go to the Console window
(menu: Window > General > Console) click the small drop-down panel in the top right, and select Open Editor Log and check your assets contribution for optimization.
And last thing you can do to reduce size is reducing .NET library size. Unity supports two .NET API compatibility levels: .NET 4.x and .NET Standard 2.0. The .NET Standard 2.0 restricts you to a smaller subset of the .NET API, which can help keep size down. and if this solution does not help so you reached the smallest size which is just the rendering and mono functions.
Upvotes: 0
Reputation: 141
That's the size of the engine, you can't get lower than that. I guess you're looking for making an instant game. You can't do it in Unity! In Unity they're working on a specific version named "Unity Tiny" for this purpose but it's still not released!
Upvotes: 1