Optimizing the APK
To get the individual file size, we make use of the console in Unity. Click on the small down arrow on the top-right of the console and select Open Editor Log
:
This will open a text file with the log information. Scroll down in the text file to where it shows the size of the individual files. As you can see, Unity already does a good job of removing assets that are not being used in the current game.
It also breaks down the assets and shows which of the assets are contributing to the size. Here we see that the menuImage.jpg
, ground.jpg
, and wall.jpg
images are quite big in size:
One of the popular tools for reducing the size of a JPEG is Paint.NET; it is a free application to reduce the file size. You can download the tool from http://www.getpaint.net/index.html.
Similarly, for of PNG images, you can use the PNG Crush tool to reduce the size of the image. It can be downloaded from https://pmt.sourceforge.io/pngcrush.
On the whole, it is recommended to use vector art as much...