Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice

Problem to load asset bundle manifest file from Http

Discussion in 'Editor & General Support' started by Who-am-I, Jun 20, 2015.

  1. Who-am-I

    Who-am-I

    Joined:
    Mar 29, 2014
    Posts:
    73
    Hello Guys,

    I am using asset bundle with unity 5.x. Its working fine but I wanna load manifest from my local server for manage version...but a Null Reference Exception error showing

    if(www.isDone)
    {
    manifest = (AssetBundleManifest)www.assetBundle.LoadAsset("AssetBundleManifest", typeof(AssetBundleManifest));
    }

    I am tied :(:(:(
    How can I solve this??
     
  2. lionelandrew

    lionelandrew

    Joined:
    Oct 16, 2013
    Posts:
    6
    I am having the same issue, any chance you have solved this?
     
  3. Sekai92

    Sekai92

    Joined:
    Apr 22, 2015
    Posts:
    32
    try
    Code (CSharp):
    1. WWW www = new WWW(path+manifestName);
    2. yield return www;
    3. manifest = (AssetBundleManifest)www.assetBundle.LoadAsset("AssetBundleManifest");
    4. yield return null;
    5.  
    6. www.assetBundle.Unload(false);
     
  4. Who-am-I

    Who-am-I

    Joined:
    Mar 29, 2014
    Posts:
    73
  5. tomekkie2

    tomekkie2

    Joined:
    Jul 6, 2012
    Posts:
    949
    Hello @Sekai92,
    Is this script still supposed to work with Unity 5.4.3?
    After downloading myAssetBundle.manifest file www does not return any assetbundle and I am getting null reference error here.
    Do you know how to recreate AssetBundleManifest class from www download?
     
  6. guneyozsan

    guneyozsan

    Joined:
    Feb 1, 2012
    Posts:
    99
    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.
    assetbundlemanifest.jpg
     
    marllon_alfaebeto likes this.
  7. jmjeong_unity

    jmjeong_unity

    Joined:
    Jun 4, 2018
    Posts:
    1
    that's right