I’m trying to load a 5mb asset from an Asset Bundle downloaded through a remote server and everytime, it causes a brief lag which is undesirable. I have tried using both LoadAsset and LoadAssetAsync and welp, nothing changed. The following is the code:
WWW www = WWW.LoadFromCacheOrDownload (assetBundleURL, version); yield return www; AssetBundleRequest request = www.assetBundle.LoadAssetAsync (assetName, typeof (GameObject)); yield return request; GameObject go = (GameObject) request.asset;
I have tried commenting out the LoadAsset/Async part to make sure that the download part isn’t the one causing the lag. And to my assurance, it is definitely LoadAsset/Async that is causing the lag.
Another thing, I have tested building for Android and iOS. With much luck, Android managed to download and load the asset bundle successfully (but with the lag). Unfortunately, on iOS, it managed to only download the asset bundle without loading it.
p/s: The lag occurs even without instantiating the loaded asset.
Any hint and help is greatly appreciated! Thank you.
Unity version: 5.5.0f3