Search Unity

[SOLVED]How can i make an assetbundle of a scene and all their dependencies and load it?

Discussion in 'Asset Bundles' started by dienat, Aug 30, 2018.

  1. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    I use Unity 5.6 and I tried to use BuildPipeline.BuildStreamedSceneAssetBundle(levels, outputpath, BuildTarget.WebGL, BuildOptions.UncompressedAssetBundle); but it says its obsolete, though it made the assetbundle once i try to download the chrome browser tells me "Asset Bundle download is complete, but no data have been received"

    blob:http:// GET http:// 200 (OK)
    Asset Bundle download is complete, but no data have been received
    blob:http:// Generic/unknown HTTP error
    UnityEngine.DebugLogHandler:Internal_Log(LogType, String, Object)
    UnityEngine.DebugLogHandler:LogFormat(LogType, Object, String, Object[])
    UnityEngine.Logger:Log(LogType, Object)
    UnityEngine.Debug:LogError(Object)
    <DownloadAssetBundle>c__Iterator0:MoveNext()
    UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)

    I tried to disabled web cors security using firefox but it doesnt work anyways

    The code i use to download is :

    Code (CSharp):
    1.        
    2. string uri = "http://myweb/assetbundlename.unity3d";
    3. var download = UnityEngine.Networking.UnityWebRequest.GetAssetBundle(uri);
    4.         yield return download.Send();
    5.  
    6.         if (download.isError)
    7.         {
    8.             Debug.LogError(download.error);
    9.             yield break;
    10.         }
    11.  
    12.         var bundle = DownloadHandlerAssetBundle.GetContent(download);
    13.         SceneManager.LoadScene(sceneName);
     
  2. dienat

    dienat

    Joined:
    May 27, 2016
    Posts:
    417
    it was working, dont know why gave those errors but were misleading as the bundle was not actually downloaded but downloading and needed just more time to end
     
  3. domdev

    domdev

    Joined:
    Feb 2, 2015
    Posts:
    360
    how did you solve?
     
  4. Carterryan1990

    Carterryan1990

    Joined:
    Dec 29, 2016
    Posts:
    78
    why would he answer that LOL
     
  5. valerialukaj

    valerialukaj

    Joined:
    Feb 17, 2020
    Posts:
    1
    I have the same problem: asset bundle download is complete but no data have been received. Basically I want to create an application where the asset bundles are downloaded from a remote server made with Bottle. When I build for other platforms like windows everything works, but when I work on webGL and remote server I have this error. From the server I get 200, so communication seems to be established and correct
     
    IndefinitePain likes this.
  6. arya2000

    arya2000

    Joined:
    Mar 30, 2020
    Posts:
    5
    I have the same error, did anyone find a solution?
     
  7. Aoedipus

    Aoedipus

    Joined:
    Jan 31, 2019
    Posts:
    21
    same error v2020.1.8f1
     
unityunity