For example, pretend I have a picture of a lemon png on a website that I’d like to load in game. I’d like to change the Sprite of the Sprite Renderer attached to a game object so that the new sprite is that of this lemon. I’m guessing that the texture might have to be downloaded first, then perhaps loaded with Resources.Load()?
public string url = "http://www.gettyicons.com/free-icons/138/fruits/png/256/lemon_256.png";
IEnumerator Start()
{
WWW www = new WWW(url);
yield return www;
renderer.material.SetTexture(0, www.texture);
}