What happened to www.LoadImageIntoTexture?

It’s listed:

But it has been removed from the API.

I know that WWW it’s going to be deprecated at some point but I use this method because we can do this (extracted from that page):

Can we do this with Unity 2017 beta new UnityEngine.Networking.UnityWebRequestTexture class (that it’s the same as UnityWebRequest but separated some static methods)? It only has:

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

And we can’t provide a previously created Texture2D instance.

This would be a real pain if it’s gone for us too.

WWW.LoadImageIntoTexture replaces the texture so UnityWebRequest wouldn’t be any different just that you have to set the texture yourself.

This method was accidentally lost when making WWW a thin wrapper on top of UnityWebRequest. It has been added back. Sorry for that.

2 Likes

Ok, thanks.

What about my other question about UnityWebRquest and texture format?

Why would you need to supply an already created Texture2D instance?
if you have a reference to that instance can’t you just replace that texture with the one from UnityWebRequest.GetTexture?

UnityWebRequest.GetTexture would else override the properties of the already allocated Texture2D instance