Example #1
0
    public IEnumerator GetAssetBundleBeforeGetAssetBundleListBecomeFailed()
    {
        var loaderTest = new AssetBundleLoaderTests();
        var cor        = loaderTest.LoadListFromWeb();

        yield return(cor);

        var list = cor.Current as AssetBundleList;

        var done      = false;
        var assetName = list.assetBundles[0].assetNames[0];

        Autoya.AssetBundle_LoadAsset <GameObject>(
            assetName,
            (name, obj) =>
        {
            Fail("should not comes here.");
        },
            (name, err, reason, autoyaStatus) =>
        {
            True(err == AssetBundleLoadError.AssetBundleListIsNotReady, "not match.");
            done = true;
        }
            );

        yield return(WaitUntil(
                         () => done,
                         () => { throw new TimeoutException("not yet failed."); }
                         ));
    }
Example #2
0
    public IEnumerator Setup()
    {
        assetBundlePreloader = new AssetBundlePreloader();

        var loaderTestObj = new AssetBundleLoaderTests();
        var listCor       = loaderTestObj.LoadListFromWeb(abListPath);

        yield return(listCor);

        var assetBundleList = listCor.Current as AssetBundleList;

        loader = new AssetBundleLoader(identity => abDlPath + assetBundleList.version + "/");
        loader.UpdateAssetBundleList(assetBundleList);


        var cleaned = loader.CleanCachedAssetBundles();

        if (!cleaned)
        {
            Fail("clean cache failed 1.");
        }
    }