The weight of textures is funny. why?

A 2048x2048 texture.

In the editor they tell me the weight of my spritesheet: 16MB

In the explorer they tell me the weight of my spritesheet: 2.92MB


If I renember well:

  • The file size in the explorer is the real file size

  • the size in Unity is the “imported asset size” not the file size. Unity use is own internal format for texture and don’t really care about the fact that your texture is a png, jpg or psd.

In short, the size in unity only depend of the texture size (2048*2048 in your case) and the imported setting (probably true color in your case)

The original texture file is likely compressed, so shows up with a smaller value in explorer. What’s the image type? JPG, PNG?

If you’re not turning on compression when importing it to the editor:

2048 * 2048 * 4 (bytes per pixel) = 16MB

16 Megs is the uncompressed texture size. A 2048x2048 RGBA texture is 16Megs: (204820484) bytes / (1024*1024) bytes/Meg. That’s the maximum space it may be taking in your graphics card, while the game runs. Not super useful.

2.92Megs is the file size of the compressed texture. Also not super useful, since Unity will recompress using a different method, and then compressing the entire project may shrink that more (if you have another very similar texture, for example.) It just gives you a better way to compare texture sizes (what you call weights) than just dimensions. For example, a noisy 1024x1024 texture might compresses to more than 2.9Megs.

The real things to go on are final build size and, if things are running slow, the graphics memory usage.