Unity halfing asset file size

Hi,

I am saving some per-pixel data as textures using Unity. In the Unity Editor it says the file size is 70Mb, but then when I view the file in Windows Explorer, it says the file size is 140Mb. Screenshots below.

Does anyone know why there is a difference in the numbers here and if it is possible to reduce the file size to actually be 70Mb? This would be very convenient as Github only allows files under 100Mb (I know there is Git LFS, but it is only free under 1Gb of data).

Edit: To save the textures, I am using the AssetDatabase.CreateAsset(asset, path) function, passing in a Texture2D as the asset.


Many thanks!
Jake

Having an asset Read/Write Enabled in the Import Settings doubles the size in memory. I assume the same must be happening for your file sizes (assume as I never have anything Read/Write Enabled in my games). As you are saving per pixel, you probably need Read/Write Enabled.

Hi, thanks for the suggestion! In the end I fixed the issue by swapping from text-based assets to binary assets.