public WWW LoadRemoteImage(AssetData assetData) { string imageUrl = ""; if (assetData.assetType == AssetType.ServerImage) { imageUrl = String.Format("{0}/{1}", StorageUrl, assetData.value); } else if (assetData.assetType == AssetType.Image) { imageUrl = assetData.value; } else { logger.LogError(Tag, "Attempting to loading remote image which is not of ServerImage type"); } return(getCachedWWW(imageUrl)); }
public string GetFriendImage(string id) { AssetData assetData = _sharedStateItems.FirstOrDefault(x => x.GetId() == id).image; return((assetData == null) ? "" : assetData.value); }