Search Unity

Is there a way to get AssetBundle synchronously using UnityWebRequest?

Discussion in 'Asset Bundles' started by kiteretsu, Jun 3, 2019.

  1. kiteretsu

    kiteretsu

    Joined:
    Jun 12, 2015
    Posts:
    1
    Is there a way to get AssetBundle synchronously using UnityWebRequest?

    Code (CSharp):
    1. UnityWebRequest uwr = UnityWebRequest.GetAssetBundle("http://www.my-server.com/mybundle");
    2. yield return uwr.SendWebRequest();
    As I execute the above code, AssetBundle is cached in storage.
    At this time, Is there a way to get cached AssetBundle synchronously?
    I tried LoadFromFile but it failed.

    Thanks.
     
  2. Aurimas-Cernius

    Aurimas-Cernius

    Unity Technologies

    Joined:
    Jul 31, 2013
    Posts:
    3,732
    Downloading from the internet synchronously is very bad, don't do that!