Image - Actual Size / Unity Size

I’ve never understood how Unity manages my imported image sizes.

For example, I have made a texture png that has a file size of 3KB, but as soon as I import it into Unity and make it True Colour, that file size is now 1.3MB.

Whats odd is that a lot of these images that do differ in size in file, seem to have the same size within Unity, only larger.

Example, I have 5 PNGs of a grass texture, the actual file sizes range from 100KB to 300KB, yet in Unity, they’re all 0.7MB.

Also, I remember having a large texture (actual file size was about 5MB), but in Unity, that size was around 52MB if I remember correctly, yet it made hardly any difference to my overall build size within Xcode (building for iOS here).

Can someone please shed some light here for me?

Thanks

The original file format doesn’t matter as Unity will convert png/jpg/psd etc into a native format that Unity understands. Uncompressed textures will consume more memory than compressed textures.

33737-texture-import.png

For truecolor non-transparent textures it’s (3 x Width x Height) bytes
For truecolor transparent textures it’s (4 x Width x Height) bytes

An example:
A 1024x1024 truecolor RGB texture is then 3 x 1024 x 1024 = 3145728 bytes or 3 MB

When you import a texture into unity and set it to true color that removes all compression (which is why they go from various sizes to a consistent size). For example, imagine you have 2 256x256 PNG images; one is a photo, and the other is solid black. The photo has a lot of complexity to it and will only compress a little. The black image will compress extremely well since it is just one color. So, compressed they are different file sizes, uncompressed they are the same.