Example #1
0
 public void GetProductImage(string sku, Action <Sprite> callback)
 {
     if (collectorType == CollectorServiceType.Local)
     {
         StartCoroutine(collector.GetProductTexture(sku, (tex) =>
         {
             Sprite sp = DataUtility.CreateSprite(tex);
             callback(sp);
         }));
     }
     else
     {
         StartCoroutine(collector.GetProductImage(sku, (bytes) =>
         {
             Sprite sp = DataUtility.CreateSprite(bytes);
             callback(sp);
         }));
     }
 }