I’m not sure this is a bug or not, but it does seem strange.
I’m loading ASTC compressed textures (compressed with GitHub - ARM-software/astc-encoder: The Arm ASTC Encoder, a compressor for the Adaptive Scalable Texture Compression data format. on the server side), using this code:
Texture2D tex = new Texture2D(1, 1);
if (!ImageConversion.LoadImage(tex, rawFileBytes, true)) {
RLog.Log(this.name, $"Cannot LoadImage on {url}");
yield break;
} else {
RLog.Log(this.name, $"Successfully LoadImage'd on {url}");
}
_renderTexture.texture = tex;
_renderTexture.SetNativeSize();
Where _renderTexture is actually a RawImage type.
But, while LoadImage() returns true, the texture isn’t actually working, the question mark texture is shown instead. Tested in the editor and on a couple of Android devices (this is for a mobile app).
The same ASTC file loads fine in the editor, flipped vertically.
This same code path as shown above is used with JPEG and PNG files and works ok.