So i don’t really know much about compression and other stuff when it comes to an apk, but when i built my apk, i saw that the size was 38mb which is rather large considering the project i was working on did not have much stuff. I then decided to test by adding a couple more sprites to the project, totaling around 1mb. When i built the apk this time, the file size increased by 3mb, even though i only added 1mb of sprites.
Can someone explain to me how this works and how i can reduce the apk size?
@chiragjksol mentioned about compressing size of images before loading them into unity. That is totally pointless. The file can be 30kb as jpg but once it becomes a texture and then sprite in Unity3d, it goes back to it’s original size. Unity decompresses the image from it’s format and puts it into memory as 500x500x4bytes for example, so higher resolution images will be bigger in size.
You should work on the graphics in a sophisticated editor like Photoshop or Gimp. You can resize the texture once it’s in Unity.
You should be optimising your in-game textures using the inspector. Click on a texture, then in the inspector choose and override platforms that you want to compress the image on.
If you want the texture to be smaller size make sure "Generate mip maps " is unticked.
You can select the size of the texture: Keep lowering it down until it starts to look bad in the editor on the desired resolution. If your texture is transparent select RGBA (RGB if not) and then compression PVRTC 2 bits, if it looks bad change to 4 bits.
You can also try enabling the “Strip Engine Code” In player build settings. This should reduce the build size further.
You can compress all of your image here.
and after goto File → Build Settings → click on Player Settings - > you can see there other settings, find there Device Filter and select ARMv7 and check your apk size.