How to get AssetBundleManifest object from myAssetBundle.manifest file from serwer?
I have my assetbundle files myAssetBundle and myAssetBundle.manifest stored on my serwer. I am using WWW.LoadFromCacheOrDownload to download myAssetBundle. I can not just work out how to get AssetBundleManifest object from myAssetBundle.manifest file to check it prior to downloading myAssetBundle.
In a number of forum threads I have found the same piece of code:
WWW www = new WWW(path+manifestName);
yield return www;
manifest = (AssetBundleManifest)www.assetBundle.LoadAsset("AssetBundleManifest");
yield return null;
www.assetBundle.Unload(false);
Unfortunately www.assetBundle returns to me a null value.
What am I doing wrong? Could anyone give me some hint on this?
Answer by rockear · Jul 12, 2017 at 02:52 AM
You should try new WWW(path + assetbundlename);
This is irrelevant. The problem is a serialization issue. It gets the file but cannot convert to unity object of type AssetBundle$$anonymous$$anifest.
Answer by guneyozsan · Dec 16, 2017 at 04:02 PM
Most probably you are downloading the file that looks like "assetBundleFileName.manifest". But that one is actually the manifest file of the asset bundle manifest file. You should download the file "assetBundleFileName" without extension to get the AssetBundleManifest object.
Answer by Pavlko · May 29, 2019 at 06:15 PM
Hey.. and what if I want to use the .manifest text file instead of the AssetBundle file ?
I do prefer to work with the .manifest file so I can append one more asset bundle to the system easily, without having to build all of the asset bundles...
Your answer
Follow this Question
Related Questions
How to know asset load from cache or remote? Unity 2019 1 Answer
unity3d Network Instantiate from Assetbundle 0 Answers
GetData from AudioSource after AudioLowPassFilter 0 Answers
Unity 5.5 Beta crash caused by terrain base map distance 0 Answers
Assetbundle loads in editor but not when built onto android 1 Answer