public void GetCategoryImage(long categoryId, Action <Sprite> callback) { if (collectorType == CollectorServiceType.Local) { StartCoroutine(collector.GetCategoryTexture(categoryId, (tex) => { Sprite sp = DataUtility.CreateSprite(tex); callback(sp); })); } else { StartCoroutine(collector.GetCategoryImage(categoryId, (bytes) => { Sprite sp = DataUtility.CreateSprite(bytes); callback(sp); })); } }