使用WWW.LoadFromCacheOrDownload时Unity崩溃

时间:2016-02-12 05:07:07

标签: unity3d crash

我的代码如下

using (WWW _commonFilesDOwnloader = WWW.LoadFromCacheOrDownload ("https://example.com/Testing/bundle", 1)) {
        while (!_commonFilesDOwnloader.isDone) {
            Debug.Log ("Progress " + _commonFilesDOwnloader.progress);

            yield return null;
        }

        if (_commonFilesDOwnloader.error == null) {
            //file downloaded completely

            AssetBundle _comonBundle = _commonFilesDOwnloader.assetBundle;

            AssetBundleRequest _comonBundleReq = _comonBundle.LoadAllAssetsAsync ();

            yield return _comonBundleReq;

            Debug.Log ("Done Loading");

        }
    }

它下载了整个内容,但它在if语句中崩溃,我完全不知道。 有人可以告诉我我在上面的代码中做了什么错误吗?

0 个答案:

没有答案