- Home /
best way to show iphone purchased assets
I was wondering what the best way would be to show purchased assets for an iphone app. Right now when a person purchases an item it is stored as an assetbundle in their documents folder.
I want to display a png of each item they have purchased. I'm confused about how I would loop through all the asset bundles and get all the pngs and display them in the game. Can I use www in a for loop?
Something like this?
function getAssetPngs(assetBundleName:String){
var download : WWW;
var url = "http://serveraddressgoeshere/"+assetBundleName;
Debug.Log("url="+url);
download = new WWW (url);
yield download;
currentAssetBundle = download.assetBundle;
if (currentAssetBundle != null) {
*****currentAssetBundle.somehow load png in bundle to texture2d?*******
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220613080557im_/https://answers.unity.com/themes/thub/images/avi.jpg)
Follow this Question
Related Questions
Failed to Wait on a Semaphore 2 Answers
assets bundle download persistance on iOS 1 Answer
WWW.LoadFromCacheOrDownload not working 1 Answer
no extension method `LoadAssetAsync' of type `UnityEngine.AssetBundle 0 Answers
AssetBundle - How to load older version unity asset bundle in latest version asset bundle 0 Answers