我想加載一個場景,但我從標題中得到錯誤,而我根本不知道爲什麼,因爲我在AssetBundle上調用Unload(false)。有人能幫我嗎?謝謝。無法加載緩存的AssetBundle。一個相同名稱的文件已經從另一個AssetBundle加載
void Start() {
...
StartCoroutine (DownloadAndCache());
...
}
IEnumerator DownloadAndCache(){
// Wait for the Caching system to be ready
while (!Caching.ready)
yield return null;
// Load the AssetBundle file from Cache if it exists with the same version or download and store it in the cache
using(WWW www = WWW.LoadFromCacheOrDownload (BundleURL, version)){
yield return www;
if (www.error != null)
throw new Exception("WWW download had an error:" + www.error);
AssetBundle bundle = www.assetBundle;
bundle.LoadAll();
AsyncOperation async = Application.LoadLevelAsync("main");
Debug.Log (async.progress);
yield return async;
bundle.Unload(false);
}
}
在這行不錯誤發生?捆綁包中包含級別'main'? – Kay
我'解決'(不)問題。在Unity 4.1.2中,當我停止遊戲時,從AssetBundle崩潰加載場景。 http://answers.unity3d.com/questions/382154/problem-in-loading-scene-from-asset-bundle.html#comment-469348 and here http://answers.unity3d.com/questions/ 373556 /如何-可以-I-停我的編輯器 - 從 - 崩潰 - 每次-i.html – ahsoka