- Home /
 
 
               Question by 
               Joberon · Jun 20, 2019 at 06:07 PM · 
                assetbundleserverscene-loading  
              
 
              Cannot access asset bundle from server
Below is come code I've been attempting to use to access an asset bundle with a scene in it. I keep getting an "generic http error."
Does anyone know if it's an error with the server or the code itself?
 IEnumerator GetAssetBundle()
 {
     UnityWebRequest www = UnityWebRequest.GetAssetBundle("http://www.linktoassetbundle.com/notthereallink");
     yield return www.SendWebRequest();
     if(www.isNetworkError || www.isHttpError) {
         Debug.Log(www.error);
     }
     else {
         AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www);
         string[] scenePath = bundle.GetAllScenePaths();
         SceneManager.LoadScene(scenePath[0]);
     }
     
 }
 
              
               Comment
              
 
               
              Your answer
 
             Follow this Question
Related Questions
Do asset bundles need to be decompressed after loading a scene? 1 Answer
About BuildPipeline.BuildStreamedSceneAssetBundle 0 Answers
How do I load an Assetbundle Scene that has Assetbundle reference in it? 0 Answers
Server generated battle scene instead of client - Concept assistance please? 2 Answers
Save downloaded Assetbundle on device. 0 Answers