I have a button
UI game object. That doesn't have an image from the start. I fetch a image from the server
and then set it as button
image. Here is the code:
WWW w = new WWW (newUrl);
yield return w;
Adbutton.GetComponent<Image>().sprite = Sprite.Create(w.texture,new Rect(0, 0, 100, 100),new Vector2(0,0));
The button does change color but image is not set. Help me out!