Beispiel #1
0
        private void GetDataFromFile(LocalImageLoader localImageLoader)
        {
            if (localImageLoader != null)
            {
                string url = localImageLoader.Url;
//				Debug.Log ("ImageLoadManager->GetDataFromFile url= "+url);
                if (File.Exists(url))
                {
                    byte[] data = File.ReadAllBytes(url);
                    if (data == null || data.Length <= 0)
                    {
                        Debug.LogError("ImageLoadManager->GetDataFromFile: read byte data is null, url is " + url);
                        return;
                    }
                    LocalImageLoaderResponse response = new LocalImageLoaderResponse();
                    response.Data             = data;
                    localImageLoader.Response = response;
                }
                else
                {
                    Debug.LogWarning("ImageLoadManager->GetDataFromFile: file is not exits, url= " + url);
                }
            }
        }
Beispiel #2
0
 internal void GetResponse(LocalImageLoaderResponse response)
 {
     Response = response;
 }