Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public void setUrlImageToFSprite(string url, FSprite fSprite)
- {
- try
- {
- float originalSpriteWidth = fSprite.width;
- float originalSpriteHeight = fSprite.height;
- FAtlasElement netPic = Futile.atlasManager.GetElementWithName(url);
- fSprite.element = netPic;
- fSprite.width = originalSpriteWidth;
- fSprite.height = originalSpriteHeight;
- Debug.Log("BaseView -> Found atlas");
- }
- catch (FutileException e)
- {
- Debug.Log("BaseView -> Atlas not found. Getting it.");
- Futile.instance.StartCoroutine(IEsetUrlImageToFSprite(url, fSprite));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement