Advertisement
Guest User

Untitled

a guest
Mar 29th, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. IEnumerator DownloadStatusPostPicture()
  2. {
  3. WWW downloader = new WWW(ConfigurationHelper.Configuration.dispositivo.imagen);
  4. yield return downloader;
  5.  
  6. if (string.IsNullOrEmpty(downloader.error) && downloader.bytes != null)
  7. {
  8. var filename = System.IO.Path.GetFileName(downloader.url);
  9.  
  10. StatusPostPicture.Resize(downloader.texture.width, downloader.texture.height);
  11. StatusPostPicture.LoadRawTextureData(downloader.texture.GetRawTextureData());
  12. StatusPostPicture.Apply(false, false);
  13. System.IO.File.WriteAllBytes(System.IO.Path.Combine(GameObject.FindObjectOfType<BrandCustomizer>().GetSavePath(), filename), downloader.bytes);
  14. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement