- Home /
Question by
amlfu · Mar 29, 2018 at 08:16 PM ·
unity 5assetbundle
why the value of "bundle" variable is null? can anyone help please?
using UnityEngine; using UnityEngine.Networking; using System.Collections;
public class MyBehaviour : MonoBehaviour { void Start() { StartCoroutine(GetAssetBundle()); }
IEnumerator GetAssetBundle() {
UnityWebRequest www = UnityWebRequest.GetAssetBundle("http://portal.futurbus.com/ar_objects/model.girl");
yield return www.SendWebRequest();
if(www.isNetworkError || www.isHttpError) {
Debug.Log(www.error);
}
else {
Debug.Log ("test2");
AssetBundle bundle = DownloadHandlerAssetBundle.GetContent(www);
}
}
}
Comment
Your answer
Follow this Question
Related Questions
2D toolkit dynamically load scenes with the new assetbundle of Unity5 0 Answers
Can I create asset bundles dynamically in Unity 5? 1 Answer
How to load a scene from an asset bundle in unity 5? 1 Answer
Unity 5 Resources.LoadAsync on Android slower than iOS? 0 Answers
problem : AssetBundles in Unity5 0 Answers