2
\$\begingroup\$

We are developing racing game for android and iOS.

Our problem is final game build size is getting more than 100+ mb.

So here is what we tried,

to reduce it by compressing textures.

Reducing "Max size" to 512 and 256

Reduced .FBX size

All is well n good though the final "scene" size for each scene is more than 8mb.

I am not sure why scene size is that much? I would like to know what are the things that causes unity scene size to occupy that much memory?

\$\endgroup\$
7
  • \$\begingroup\$ Do you have any redundant or unused assets in your "Resources" folders? Because these can be loaded dynamically by script, Unity will package up every file under a folder named "Resources" into the build, even if it's not being used or referenced anywhere. So that's one common cause of build bloat. \$\endgroup\$
    – DMGregory
    Commented Jun 29, 2015 at 16:54
  • \$\begingroup\$ Yes resources folder do exists in project, though my question is scene size is getting increase, say for example I have scene name "Demo" when I click on it from project view > right click > show in explorer. The total size of "demo" is more than 8+ mb \$\endgroup\$
    – idurvesh
    Commented Jun 29, 2015 at 17:12
  • \$\begingroup\$ That may or may not translate into build size, depending on your settings. If scenes are serialized as human-readable text, they size in your source folder will be inflated, but I'd expect the actual built size to be smaller, if it converts to a binary or compressed format in the build process. \$\endgroup\$
    – DMGregory
    Commented Jun 29, 2015 at 17:15
  • \$\begingroup\$ "human readable text", we have asset serialization set to "Force text" is that something to do with it? \$\endgroup\$
    – idurvesh
    Commented Jun 29, 2015 at 17:18
  • 1
    \$\begingroup\$ After Building your project, in the Editor, Right-Click on the Console Tab and choose Open Editor Log. Scroll through this and you will find a section listing all Files in your compiled Project and there sizes compressed and uncompressed letting you narrow down exactly what is taking up room. \$\endgroup\$ Commented Jun 29, 2015 at 20:39

1 Answer 1

2
\$\begingroup\$

You can see Editor build log to check which files contribute most to the size of your build. You can open it from within Unity by clicking on the list icon right abot the error icon on console view. (See image attached)

enter image description here

Then you can see if you have unecessary assets and reduce size of others.

You can also strip assemblies in the final build to reduce size. Go to Players Setting -> Other Settings under "Optimization" select .Net 2.0 subset and Stripping Level use micro mscorelib.

\$\endgroup\$
2
  • \$\begingroup\$ thanks for snapshot....I checked there...its showing scenes sizes to more than 8 mb.....I am looking for factors which increases scene's memory size.... \$\endgroup\$
    – idurvesh
    Commented Jun 30, 2015 at 14:21
  • \$\begingroup\$ Its in there. You will see a break down of each file in the Scene and how much its contributing to the total size. From there you can decide what you need to optimize to cut down on the memory footprint. \$\endgroup\$ Commented Jun 30, 2015 at 18:38

You must log in to answer this question.

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