Hi I’m trying to read html data to my app like the codes below.
But I realize sometimes(which is even more frustrating) www.data is blank even though I try to use yield state or take advantage of isDone variable. It seems to me that loading is apparently done, but www.data doesn’t have anything within it.
Is this a bug of Unity?
var wwwHtml :WWW;
function Start()
{
yield Search("kalbi");
yield Search("Bush");
yield Search("General+kim");
yield Search("dog");
yield Search("tofu");
yield Search("Bush");
yield Search("General+kim");
yield Search("cat");
}
function Search(str : String)
{
var query="http://images.google.com/images?q="+str+"&hl=en&imgsz=Medium";
var wwwHtml= new WWW (query);
yield wwwHtml;
Debug.Log(wwwHtml.data);
}