1
\$\begingroup\$

This is my second time making and game and I want to make sure that I fit under 50 mbs. So far my plan is to fit all the games artwork into two 2048x2048 sprite sheets. I tested a empty unity3d project and when the apk was made it was 19 035 KB of size. Where does this overhead come from and how can I reduce it?

This is not a duplicate question of this one. I'm asking why building a completely empty project results in a apk with a size of 19 MB. Does this mean that I have limit my assets to 30 MB so that the complete app will be less than 50 or is there a way to strip some of those initial 19 MB.

\$\endgroup\$
2
  • \$\begingroup\$ Possible duplicate of How to compress Unity apk output? \$\endgroup\$
    – Philipp
    Apr 6, 2016 at 10:54
  • \$\begingroup\$ @Philipp dont think its a duplicate. I'm asking why a completely empty project, no camera, no nothing has a size of 19 MB. \$\endgroup\$
    – Uri Popov
    Apr 6, 2016 at 10:57

1 Answer 1

1
\$\begingroup\$

Yes, that's the minimum size for an empty project when deployed.

Mono Runtime

The Mono Runtime which allows your C#, JS, Boo code to execute - basically like the .NET Framework - not a trivial piece of machinery!

Unity Platform

You know wherever you are using UnityEngine? That doesn't come from nowhere. All the logic and functionality of the engine (a lot) works in conjunction with whatever code you write and assets you insert, to create the game in question. You can't reduce it - the engine / platform comes as-is. Imagine you had to write everything that Unity does, in native code. It would not be small.

Other details

The same was true of SWF files back when Flash was a big thing. A large portion of the runtime is contained in the build artifact.

You can try Edit->Project Settings->Player Settings->Stripping Level.

Beyond a Unity build's base size, i.e. for trimming your own resources, you can try this.

And IME you won't get a build / deploy time less than 2 mins on Android.

P.S. This is one reason I prefer writing native apps using C. Incredibly small, fast build and deploy.

\$\endgroup\$
6
  • \$\begingroup\$ @ArcameEmgineer Switching the divice filter to just ARM reduces about 8-9 MB. Do you think this will limit the app running to just some anrdroid devices ? i'm targeting mobile phones and tablets. Are there some that dont use ARM ? \$\endgroup\$
    – Uri Popov
    Apr 6, 2016 at 11:18
  • 1
    \$\begingroup\$ I would say there are very few consumer mobile devices that don't use ARM architecture nowadays. But I recommend you do further research on that. AFAIK everything is basically ARM Cortex based, including iOS devices. \$\endgroup\$
    – Engineer
    Apr 6, 2016 at 11:19
  • 2
    \$\begingroup\$ Ah the strip assemblies shaved off another MB, now my prototype(with some sample art) is only 10MB. This I can work with. Thank you kind sir. \$\endgroup\$
    – Uri Popov
    Apr 6, 2016 at 11:52
  • \$\begingroup\$ I have another question. From the unity3d build logs I can see that my current prototype is 7.6mb. But windows says that its size on disk is 10mb. The question is when i upload to google play what size will they get ? \$\endgroup\$
    – Uri Popov
    Apr 7, 2016 at 8:00
  • 1
    \$\begingroup\$ My file System is NTFS, after putting the apk on my droid phone, it says that the size is 10.3 mb, while on windows its about 10.5. I'm thinkg the editor log is simply lying about the build size. \$\endgroup\$
    – Uri Popov
    Apr 7, 2016 at 8:28

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .