- Home /
Assetbundle fail to load at IOS local
Hi
I'm encounter with some assetbundle problem on IOS device
I can download my assetbundle file from internet and save it at some local path
but when I try to load it, it just crash and the App will shut down automatically.
That's something will not happen in Android
This also won't happen when I preview in Unity( works fine on Mac and PC).
here's my ccode :
IEnumerator DownloadBundle()
{
while (!Caching.ready)
yield return null;
www = WWW.LoadFromCacheOrDownload(downloadPath, 1);
yield return www;
isDownloading = false;
AssetBundle bundle = www.assetBundle;
AssetBundleRequest request = bundle.LoadAssetAsync("Car", typeof(GameObject));
yield return request;
GameObject obj = request.asset as GameObject;
bundle.Unload(false);
www.Dispose();
Instantiate(obj, transform.position, transform.rotation);
}
Is there anything that I do wrong?
Answer by natasha1403 · May 25, 2017 at 04:24 PM
I have come across similar issue and RAM has been the primary reason for crash. If there is a memory leakage then available RAM for your app will keep on decreasing and App will finally crash. You can check how much RAM your app is using for every frame on Xcode Intruments or Unity profiler
Your answer
Follow this Question
Related Questions
Asset Bundles with In-App Payment in Unity Mobile 1 Answer
Using AssetBundles as IAP Crashing 0 Answers
Does Apple allow you to download assetbundles with scriptableobjects, from an external server? 0 Answers
Assetbundle LoadAsyc speed is much slower than Load 0 Answers
Loading Scripts from asset bundle in iOS and WebGL. 0 Answers