• Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
7
Question by Sector11 · Aug 05, 2011 at 09:06 AM · androidmemoryapkfilesize

File size is far too big!!

Hello! I have a little problem with the file size of my android game. The game is made of only 1 scene with 1 camera, 1 directional light, 4 cubes, 1 plane, 4 javascripts and 2 materials. But the file size of the .apk file is already 7 MB and when I load the game on my android device it takes 19,45 MB. Now the question is, how is that possible and what can I do to minimize the size of the game? If anyone knows the answer please reply.

Comment
Add comment · Show 3
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Aug 05, 2011 at 04:19 PM 0
Share

Don't forget that your build is more than just your assets. The build includes the "whole" Unity3D engine with all features including the mono library.

See this page for more information:
http://unity3d.com/support/documentation/$$anonymous$$anual/iphone-playerSizeOptimization.html

avatar image dbdev · Apr 16, 2014 at 06:49 AM 0
Share

Agreed, here's my experience: I build the same project into iOS, just moments after building into Android, without changing the project, here's the sizes:

Android: 21.86$$anonymous$$B iOS: 64 bytes (I did not forget the mega part) :D

I guess maybe Android needs a player and iOS doesn't?

avatar image Darioszka · Mar 06, 2016 at 11:39 AM 0
Share

Yes it fixed my problem. From size 19 to 11!

8 Replies

· Add your reply
  • Sort: 
avatar image
2

Answer by Minerne · Aug 05, 2011 at 04:42 PM

Check the sizes and settings for your assets. Textures can take up a significant amount of space, and the quality of those textures does make a difference. Lowering the quality can dramatically reduce the size of your project.

Also, make sure you remove any unused assets.

Comment
Add comment · Show 1 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sector11 · Aug 06, 2011 at 08:47 AM 0
Share

When I checked the size for the first time I didn't have even one texture. the size of the assets folder was about 370 $$anonymous$$B. But the size of the .apk file was 7 $$anonymous$$B already.

avatar image
1

Answer by kaloss · Aug 05, 2011 at 10:37 AM

that's normal. The size won't change much. My current project size: 300MB. Unity basic builds a 11MB apk file for me, and I'm happy with it :)

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Sector11 · Aug 05, 2011 at 11:09 AM 0
Share

well that's really small. But the size of the apk file is not the size of the actual game or is it?

avatar image kaloss · Aug 05, 2011 at 11:26 AM 0
Share

the size of the game is another story. about > 25mb, but they are on your SD card, so that is not a big problem.

avatar image Sector11 · Aug 05, 2011 at 12:04 PM 0
Share

but that cant be the solution. I mean, my game is really simple and needs only 3 $$anonymous$$B less memory than Angry Birds which is 2D but for sure much more complex

avatar image
-2

Answer by Meltdown · Aug 05, 2011 at 09:08 AM

Remove any un-needed assets from your assets folder. Unless you have PRO, Unity will not do this automatically for you.

Comment
Add comment · Show 3 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Bunny83 · Aug 05, 2011 at 04:13 PM 2
Share

That's absolutely not true! Unity will only include those assets in the build that are used / referenced by any of the included scenes.

$$anonymous$$aybe you've meant code-stripping but that's something totally different. You can have 5TB of assets in your project but when you don't use them they doesn't hurt (except the loading time in the editor :D)

When you created a build, open the editor-log (the little button at the top right in the console-window). There's a detailed list of all inclued assets and even a statistic from the biggest asset to the smallest. Just search for "`Player size statistics`"

avatar image Meltdown · Aug 05, 2011 at 04:21 PM 0
Share

Ooh ok, my bad :/ Thought build size stripping included unused assets for some reason.

avatar image Sector11 · Aug 06, 2011 at 08:43 AM 0
Share

Now I took a look at the editor-log and it says that nearly 73% are Included DLL's (3.8 $$anonymous$$B). Textures 20%. The size of the .apk is 7.7 $$anonymous$$B.

  • ‹
  • 1
  • 2

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Welcome to Unity Answers

If you’re new to Unity Answers, please check our User Guide to help you navigate through our website and refer to our FAQ for more information.

Before posting, make sure to check out our Knowledge Base for commonly asked Unity questions.

Check our Moderator Guidelines if you’re a new moderator and want to work together in an effort to improve Unity Answers and support our users.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Android game too heavy after installation! 0 Answers

Sprites increase android apk size 2 Answers

Errors in building Andriod apk 1 Answer

Error building Player: UnityException: APK Signing Failed! Failed to sign APK package. See the Console for details. 1 Answer

Streaming from mobile with Unity3D 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges