Hello everyone~
I have problem with load image from www
After loading,
Some image looks fine:
Some image looks bad:
and here is my project:
LoadImage.rar
and script:
using UnityEngine;
using UnityEngine.UI;
using System.Collections;
public class LoadImage : MonoBehaviour {
public Image _image;
void Start () {
_image.preserveAspect = true;
// This Image is Fine
//StartCoroutine(Load("http://img7.8comic.com/3/9337/2/001_avx.jpg"));
StartCoroutine(Load("http://img7.8comic.com/3/9337/3/001_3fm.jpg"));
// This Image has problem
//StartCoroutine(Load("http://img7.8comic.com/3/9337/5/001_rc6.jpg"));
//StartCoroutine(Load("http://img7.8comic.com/3/9337/5/002_d75.jpg"));
}
IEnumerator Load(string url) {
Debug.Log ("Start Loading Image...");
WWW www = new WWW(url);
yield return www;
if (www.error == null) {
_image.overrideSprite = (Sprite) Sprite.Create(www.texture,
new Rect(0, 0, www.texture.width, www.texture.height),
Vector2.zero);
Debug.Log ("Image Loaded.");
} else {
Debug.Log (www.error);
}
}
}
I think maybe this’s WWW’s problem,
cause image looks fine if I load image from project.
Anyone know how to fix it :(?

