예제 #1
0
    IEnumerator loadImage(string url, SQSourceLoad loadCall)
    {
        if (url != null && url.Replace(" ", "") != "")
        {
            WWW www = new WWW(url);
            while (!www.isDone)
            {
                yield return(new WaitForSeconds(0.01f));
            }
            yield return(www);

            if (www.texture != null && string.IsNullOrEmpty(www.error))
            {
                if (loadCall != null)
                {
                    loadCall(www.texture);
                }
            }
        }
    }
예제 #2
0
 public void LoadSource(string url, SQSourceLoad loadCall)
 {
     StartCoroutine(loadImage(url, loadCall));
 }