Advertisement
Guest User

Untitled

a guest
Nov 28th, 2014
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public void setUrlImageToFSprite(string url, FSprite fSprite)
  2. {
  3. try
  4. {
  5. float originalSpriteWidth = fSprite.width;
  6. float originalSpriteHeight = fSprite.height;
  7.  
  8. FAtlasElement netPic = Futile.atlasManager.GetElementWithName(url);
  9.  
  10. fSprite.element = netPic;
  11. fSprite.width = originalSpriteWidth;
  12. fSprite.height = originalSpriteHeight;
  13.  
  14. Debug.Log("BaseView -> Found atlas");
  15. }
  16. catch (FutileException e)
  17. {
  18. Debug.Log("BaseView -> Atlas not found. Getting it.");
  19. Futile.instance.StartCoroutine(IEsetUrlImageToFSprite(url, fSprite));
  20. }
  21.  
  22.  
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement