- Home /
 
               Question by 
               EddieHittler · Dec 20, 2016 at 03:25 PM · 
                androidassetbundleimage  
              
 
              Images Not Displaying Correctly On Android
Hi, I have an Asset Bundle that holds a sprite. I have the Bundle to download and display the sprite, it all works fine in the editor but when I build to Android it never gets displayed. It does download but never get assigned. Can anyone look at my script and see why?
 using UnityEngine;
 using System.Collections;
 using UnityEngine.UI;
 
 public class GetAsset : MonoBehaviour {
 
     const string url = "http://gdurl.com/R2OM/download";
     public Text printError;
     public Image accountScreen;
 
     IEnumerator Start(){
         WWW www = new WWW(url);
         yield return www;
 
         if (www.error != null){
             print(www.error);
         } else {
             AssetBundle bundle = www.assetBundle;
             print(www.isDone.ToString());
             //printError.text = (www.isDone.ToString());
             Sprite accountSprite = bundle.LoadAsset<Sprite>("AccountScreen");
             accountScreen.sprite = accountSprite;
             printError.text = (accountSprite.ToString());
         }
     }
 }
Thanks.
               Comment
              
 
               
              $$anonymous$$ake sure override for android is on, there should be an option to override all sprites somewhere in build settings
Your answer
 
 
              koobas.hobune.stream
koobas.hobune.stream 
                       
                
                       
			     
			 
                