The Windows Standalone EXE file is large, how to reduce the size ?

Hi there,

This this our first game built with Unity, we use Cocos2d-x previously.

Now we are trying to solve this problem while our game is getting ready to be published.

The problem is the executable file(.exe) built for Windows Standalone is very large, event 15.3mb for an empty project.

The Unity Editor we use is Unity5.2.1f1(and 5.3.2f1) with pro features by patching. We have planned to by the pro version for final release.

We thought Unity does not focus on Windows Standalone as much as Mobile and other Platforms, so it does not separate the components out of the EXE file like other platforms. While this makes the EXE at least 15mb large and launches very slow the first time on a machine.

After searching solutions for reducing the size of the Windows Standalone EXE file, we found the Unity Pro, with the Pro license, will do this job for us by removing the unnecessary code and modules. Is this true ? If it's true, we will buy it and finish it. Otherwise, how exactly can we resolve this problem ?

Any advise is appreciated. Thanks in advance.

Check the editor log it will show you what elements are taking up the most space.
Unity Console, click on the top right corner (three small lines), Open Editor Log.
Clear it, save it, build the it and reload it, there should be a whole section about the resource sizes with KB and % of total.
Then you will have to do something to those resources.

Unity can easily reduce the size of textures by tweaking the import settings.
Models could be stripped of animations if you do not use them.
Avoid WAV files for audio. Better to go with mp3 or ogg

Import textures at lower resolutions, then see if they look good enough.

  • You could try all the advanced import settings, try lower resolution with truecolor to retain quality. The texture preview window shows the size of the imported asset, the building apk stage adds compression (which does little to improve the size of compressed images)
  • Look at textures that could be generated at runtime (like a red square or gradient) and remove them in favor of code.

Models hardly take up any space (when compared to a huge texture), but if one of your models does end up being huge, some tweaking might be necessary to reach your goals. Simplifying a model could be easy if it does not need to be perfect. Even a small gain would be a gain, so experiment away.

Replacing the assets with assets designed for your current application is still the best bet.