Some size in the bottom of the inspector.

Hello, guys! Can you help me with? What means the size of 3.6mb in the inspector’s bottom near the compression format?:slight_smile: I worked with Unity for about 1 year, but never paid attention to it.

Anyone knows?:frowning:

Guys?:frowning:

Does no one know what that means? Where someone can explain it for me ?

It tells you how much memory will be consumed by the texture in a build.
Check out how it changes when you select different compression options (low quality, crunch, …)

Are you sure ? Completed apk without any stuff, i mean clear project, will take approximately 46mb. When I add some textures and not compressed them(size of each texture as example I wrote upwards will about 15mb each)… But when I build apk with them it takes only ~ 48mb. According your words apk must be at least 60+mb

Or, you mean - video memory?

It should be file size. Is this on an uncompressed build?
Video memory is not really relevant because in order for an image to be used it has to be present in its raw (uncompressed) form anyway. (Except for DXT compression)

Hi, just now I was trying to made apk with Normal compression and without compression. So, For example I have 3 image files that in “Normal compression” take - 1mb,3.6mb and 1mb, after I chose “None comression” it became - 4.2mb, 14.3mb and 4.2mb. This sizes I take from Inspector. So, with Normal compression apk takes - 21.1mb - without compression - 21.4mb. If you say correctly, apk without compression must take : (21.1 - 1 - 3.6 - 1) + 4.2 + 14.3 + 4.2 = 38.2mb

Sorry for the confusion, I was talking about the build itself.
When you start a build you can use LZ4 (lite, for storage on disk), LZMA (heavy compression, for transfer over the internet) or none at all.

Because that can also have a big effect even on textures depending on the specific pixel format that is used (for example RGB565 + block encoding can prepare a texture so it can get compressed more easily but I don’t know if unity even supports that. The point still stands though.)

hmmm… So, that size means size in build? And one more question, why I need to use compression if it takes only for 0.3mb less space?

Honestly, I thought that build - it is an apk… Now I do not quite understand what is at issue and what is the build.

If it really only makes a 300kb difference for you then I would suggest you don’t use any compression for faster build times.

As you build bigger games compression will have more of an effect.
Also keep in mind that trying to compress already compressed files will often take a long time for very little gain (if any at all, it depends on the combination of the compression algorithms involved).

As for your other questions, I’m not sure.
Probably @alexeyzakharov can give more detaild and better answers.
I’m not so sure about the number you initially asked about either.

And I want to add my own question as well:

  • When you build lets say a normal windows release and you have some assets in your resources folder (which gets included in the build), will the LZ4 compression be applied to the whole output, or just the assets? And will textures be excluded as they are often already quite compressed? Or are BCn or DXTn compressed file still somewhat compressible by LZ4 as well as LZMA?

I was checking again some way. I made 2 apk - one with compressed textures and one without compression. Then I installed both apk and checked size. Difference was 300kb. So, dont corrextly understand what means size in the inspector.

Hello guys!

Inspector displays in-memory size of the texture asset. It is defined by size and format. In your case it is 2048x1824x1, where 1 is bytes-per-pixel of the texture format which is 1 for 8bit ETC2. Basically the texture would use this amount of memory when loaded in the player (in case this format is supported on the device).

Texture size in the build is also affected by player compression ZIP or LZ4 for the apk and the difference might be smaller than in-memory size.
See Unity Blog by @anon_74438169 -suvorov

Hi!
Honestly, I am not professional, so maybe Im not understand something. But thank you for your reply, it helped me more understand my question :slight_smile:
And one more question, than smaller size = faster game will be?

Generally, yes.
It is true for textures of the same format :slight_smile:

Overall performance depends on many factors - texture resolution, format, device support, how is is used in a shader. E.g. if device doesn’t support the texture format, texture is converted to say RGBA32 and that + uploading takes more time.

1 Like

Many thanks for your answer :slight_smile: