Answer the question
In order to leave comments, you need to log in
Installing image from Unity server?
You need to download the image from the server via a direct link, save it to your phone and set it to the Image element. How can I do that?
Answer the question
In order to leave comments, you need to log in
Tired of searching.
private IEnumerator GetAvatar()
{
string url = "Ссылка на картинку";
WWW img = new WWW(url);
yield return img;
Image imga = avatar.GetComponent<Image>();
imga.sprite = Sprite.Create((Texture2D)img.texture, new Rect(0, 0, img.texture.width, img.texture.height), Vector2.zero);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question