I create a texture, 256x256, RGB24 format, dynamically using Texture2D.LoadImage method. This texture uses 256 KBs (256 * 256 * 3 = 192 KBs for base texture, mipmaps increase that by 1/3 so 256 KBs total). This is the number that lies right there in the Inspector when I select the texture.
However, Unity’s profiler shows that this texture is 0.6 MB. Why?
My guess is that it also stores the texture accessible for CPU, as isReadable returns True. Is there a way to dispose that memory and store the whole texture only once?
Specify false to second argument of LoadImage.
However, it seems that UnityEditor always consumes the same memory as when IsReadable is enabled. (I am using Unity2016.4 on Mac)
I checked that It worked correctly on build for Android.
And, you can also save more memory by disabling mipChain.
var texture = new Texture2D(0, 0, TextureFormat.ARGB32, false);
texture.LoadImage(data);