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. Dismiss Notice

AssetBundle.GetAllAssetNames deprecated , what to use with 2017.1 ?

Discussion in 'Scripting' started by BlueRain01, Sep 28, 2017.

  1. BlueRain01

    BlueRain01

    Joined:
    Aug 22, 2010
    Posts:
    86
    Hi All
    i'm using both unity Asset Bundle Manager and browser but i want to get the assets names from
    the bundle so i give the player a choice what to load .
    it seems AssetBundle.GetAllAssetNames was deprecated after 5.2 .
    so what i should use instead ?
    or what your suggestions ?

    thanks .
     
  2. RoMax92

    RoMax92

    Joined:
    May 29, 2017
    Posts:
    135
    Hi, i'm trying to use the asset bundles in the last weeks, more documentation is confued or incomplete...

    I use a json file downloaded from the server with the list of all the bundles, after a script create a button in UI foreach assets and use the class WWW.LoadFromCacheOrDownload() to download the bundle
     
  3. RoMax92

    RoMax92

    Joined:
    May 29, 2017
    Posts:
    135
  4. BlueRain01

    BlueRain01

    Joined:
    Aug 22, 2010
    Posts:
    86
    My problem is not about downloading , i think for that you just go ahead and use DownloadHandlerAssetBundle.GetContent(www);
    where www is declared like this
    UnityWebRequest www = UnityWebRequest.GetAssetBundle("http://Myurl.com/bundle.unity" //
    yield return www.Send(); //use SendWebRequest() in unity 2017.2
    and use Couroutine to get it .

    for my case i want to read what inside the bundle and get all the names and use that to load specific asset .
     
  5. BlueRain01

    BlueRain01

    Joined:
    Aug 22, 2010
    Posts:
    86
    And indeed the documentation are confusing right now , i know they are working on better asset bundle solution.