UnityWebRequest inconsistent API

I suppose that the objetive is that UnityWebRequest replaces WWW. To do that you need to provide the same API.

Now we have a problem. As 5.4b4 we can:

public static UnityWebRequest GetAudioClip(string uri, AudioType audioType);
public static UnityWebRequest GetTexture(string uri);
public static UnityWebRequest GetTexture(string uri, bool nonReadable);

But there is no:

public static UnityWebRequest GetTexture(string uri, TextureFormat textureFormat);
public static UnityWebRequest GetTexture(string uri, TextureFormat textureFormat, bool nonReadable);

I assume that you create a ARGB32 Texture but sometimes we want another format that with WWW was possible to do.

“This function replaces texture contents with downloaded image data, so texture size and format might change. JPG files are loaded intoRGB24 format, PNG files are loaded into ARGB32 format. If texture format before calling LoadImage is DXT1 or DXT5, then the loaded image will be DXT-compressed (into DXT1 for JPG images and DXT5 for PNG images).”
And also there is no:
public static UnityWebRequest GetMovieTexture(string uri);

Passed along to Justinas, so duly noted. Thanks!

Thanks Alex!

Hi! I´m having troubles with the new class too. I´m using it for better performance on images download from my host, and the performance is much better with the new method. But I can´t save this new textures with the “EncodeToPng()” function. It said that texture is not Readable, but with the WWW class it works.

Do you know how to save locally this new textures? Thanks!

Gabriel.