Different Sprite Size (Explorer vs Inspector)

Hi All,

My PNG sprite size is 6kb in Explorer but when I check in the Inspector it says 3.1mb. Which one is true and affect my build size? I’m using 2019.2.17f1. Thanks.

5321601--535506--upload_2019-12-29_13-37-6.png

What compression do you use for your file?

I have a png file that is 1.48 mB in Windows Explorer and 2.3 mB (high quality compression, crunch compressed quality 100) in Unity. If I use no compression for the same file, it goes up to 9 mB in Unity.

1 Like

@JosephMGS

You should only worry about texture sizes, if you use uncompressed textures. Using compressed textures will add those to build, not source texture asset, unless you add source file to Resources folder or something like that.

See:

Formats like ancient DXT format are lossy, they compress the source texture to compressed format bit like jpeg image, and then it is read runtime by GPU (and also stays compressed in video memory IIRC).

Also, you have a NPOT texture size - another issue, but you should read about using POT (power of two) sized textures, these will be more optimal and using POT sized textures is the “standard” way to author textures that are suitable for 3D graphics / GPU use.

1 Like

Thank you guys. The above example is a noncompressed texture by the way. To clarify with a simple question;

If I don’t compress my 6kb PNG image does that mean it can go up to 3mb in size within build?

The size that will be used in build is most probably the size mentioned by Unity.

1 Like

It seems it is as what @ says. Also found some references below. Thank you all :slight_smile: