Open der-hugo opened 1 year ago
See https://stackoverflow.com/questions/75050788/how-to-create-webp-image-file-from-url-in-unity/75056837#75056837
In CreateTexture2DFromWebP you are using
lTexture2D.Apply(lMipmaps, true);
which prevents later read/write on that texture.
You could have a parameter
public static unsafe Texture2D CreateTexture2DFromWebP(byte[] lData, bool lMipmaps, bool lLinear, out Error lError, bool isReadWriteEnabled = false, ScalingFunction scalingFunction = null )
and then use
lTexture2D.Apply(lMipmaps, !isReadWriteEnabled);
so users can still keep it enabled if they want/need to.
See https://stackoverflow.com/questions/75050788/how-to-create-webp-image-file-from-url-in-unity/75056837#75056837
In CreateTexture2DFromWebP you are using
which prevents later read/write on that texture.
You could have a parameter
and then use
so users can still keep it enabled if they want/need to.