- Home /
Building a very small sized app, to less than 5mb
This is probably a useless question for 99% of unity3d current users, but I think it would be a great addition if it's not already planned or, I'd specially like to know if there is any way to do it right now!
Let's say I want to build a simple app for tablets / smartphones. First thing to worry is choosing a platform. iPhone or Android? And then go after frameworks for the one chosen.
But, what if I don't have to choose? Well, sure, I can use Unity today as it is, but the app size would be, at best, 12mb on iPhone. That's already too much and a deal breaker. I want to build a very simple app, it should go around 1mb in size!
I don't need physics nor complex particles or shaders. I just want 2D GUI and eventually a cute 3D effect.
So, can this be done with Unity? Not at all? Well, then will we ever be able to do this with Unity?
Answer by Tarlius · Sep 11, 2013 at 02:32 PM
Whilst it might be possible to optimize Unity to cut out every unnecessary library/etc to make such a small binary, in the real world its a somewhat pointless endever. Consider how the access to bandwidth and storage has changed over time. By the time Unity implemented such changes, 12mb would be even less of an issue than it is today.
Why are you so desperate to make such a small binary? The only limits you realistically have to worry about are the limits that App Store and Google Play impose, which are far above the typical bundle size output by Unity. Your time will be better spent making your app better than it would be worrying about that level of optimization in 99% of scenarios.
If you really have an infallible reason for wanting such a small binary, you'll probably have to look at native code, or perhaps a more low level implementation of Mono (you might even be able to strip out unneeded functionality since its open source). Or perhaps a web app.
Nice approach, but doesn't cut it for me. (1) You probably live somewhere the bandwidth is not an issue. That simply doesn't hold true everywhere. Also (2) simpler (and really cheaper) mobile phones will have restricted storage space and every mb counts.
I think really cheap mobile phones won't be an ideal target for Unity, but I do concede your point about it probably depends on area! I live in Japan, but the argument will hold for all first world countries, and probably second world.
If your market is a place where mobiles this cheap are commonplace, I think a web-based app might be a better choice. Unity will be limited to smartphones however you cut it unless they ported to a platform on its way out (unlikely). A web app will be easy to deploy across multiple platforms including "older" devices.
But do consider how long your product will be around. If its going to be in development for a year or two then the market is likely to have changed by release. I remember reading that google is pushing 3G in third world countries even (they can't make money selling them android phones if there is no coverage, after all...). Where is your target market?
Indeed, cheap mobile phones wouldn't be ideal for Unity. As it is. But that is the whole point of the question. Web based app isn't a better choice at all, because internet isn't reliable.
Finally, I could also appeal to (3) good design, but I figured this argument would be null in your $$anonymous$$d.
Have you read Unity's tips on $$anonymous$$imizing mobile app size? Although they do state that 12$$anonymous$$B is the size of an optimized game consisting of an empty scene with a camera...
EDIT: I totally missed the same link in the OPs question...
On the contrary, I'm usually the first to paragon efficiency! But optimizing is something you need to apply intelligently- its a science where you get 90% of the gain for 10% of the work. Needless optimisation usually leads to code that is more difficult to maintain.
I'm not too up on web app development but I know you can cut bandwidth use considerably with ajax/etc. However, in a place with patchy coverage its not so helpful if you're in a black spot...
Without going out of my way to research, I would point you towards $$anonymous$$ono, since I know thats what Unity is using for its cross platform scripts. There might be other technologies that better fit your purpose though.
Answer by tanoshimi · Sep 11, 2013 at 03:07 PM
If I'm honest, I'd say that Unity is not the right tool for the job - it's for making 3D games.
There are plenty of cross-platform libraries out there for 2d app development. You might find the propertycross project of interest - http://propertycross.com/ - which contains an implementation of a property-listings app across 14 different cross-platform frameworks, including Adobe AIR, Sencha Touch, Titanium etc. - all of which are likely to weigh in at less than a typical Unity app (clearly because they have nothing like the same featureset)
Then you've missed what I meant on my last sentence. Although I'm not aware of all options there are out there to replace Unity in this quest, I'd still like to know if anyone knows of a way to do it with unity and if Unity $$anonymous$$m itself plans to do this anywhere soon. By the way, thanks for that link. Very interesting. Weird thing they don't list Unity there...
Your answer
Follow this Question
Related Questions
How can I minimize size of an app besides resizing textures? 0 Answers
Distribute terrain in zones 3 Answers
Texture size problem: 650 pictures (jpg 924x594) makes my app 850mb larger!?!? How to reduce? 2 Answers
Maximum number of scenes in a Unity 5 build? 1 Answer
Building with Extensions 0 Answers