0 我正在从服务器URL加载3d模型并使用assetbundle,但是当我在unityeditor中加载模型时它工作正常并且立方体的3d模型显示正确。但是当我在android mobile中加载模型时,模型没有显示在屏幕上。
IEnumerator GetAssetBundle() {
string bundleURL = url;
Debug.Log (bundleURL);
using (WWW www = WWW .LoadFromCacheOrDownload(bundleURL, Version)) {
yield return www;
Debug.Log (Version);
if (www .error != null)
throw new UnityException("WWW Download had an error: " + www .error);
AssetBundle bundle = www .assetBundle;
if (AssetName == "") {
Debug.Log ("null");
mBundleInstance = Instantiate (bundle.mainAsset) as GameObject;
mBundleInstance.transform.parent = imageTarget.transform;
mBundleInstance.transform.localPosition = new Vector3(0,0,0);
}
else {
Debug.Log ("not null");
mBundleInstance = Instantiate(bundle.Load (AssetName)) as GameObject;
}
}
}
答案 0 :(得分:1)