Exemplo n.º 1
0
    public void Teardown()
    {
        var cleaned = loader.CleanCachedAssetBundles();

        if (!cleaned)
        {
            Fail("clean cache failed 2.");
        }
    }
Exemplo n.º 2
0
    public IEnumerator LoadSceneFromAssetBundle()
    {
        var listCor = LoadListFromWeb(sceneListPath);

        yield return(listCor);

        bundleList = listCor.Current as AssetBundleList;

        loader = new AssetBundleLoader(identity => sceneAbDlPath + "1.0.0/");
        loader.UpdateAssetBundleList(bundleList);

        var cleaned = loader.CleanCachedAssetBundles();

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

        var done      = false;
        var sceneName = string.Empty;

        // シーンをロードする。
        yield return(loader.LoadScene(
                         "Assets/AutoyaTests/RuntimeData/bundledScene.unity",
                         LoadSceneMode.Additive,
                         loadedSceneName =>
        {
            sceneName = loadedSceneName;
            done = true;
        },
                         (loadFailedSceneName, error, reason, status) =>
        {
            Fail("failed to load scene, loadFailedSceneName:" + loadFailedSceneName + " error:" + error + " reason:" + reason);
        }
                         ));

        True(done);

        var cor = SceneManager.UnloadSceneAsync(SceneManager.GetSceneByPath(sceneName));

        while (!cor.isDone)
        {
            yield return(null);
        }
    }
Exemplo n.º 3
0
    public IEnumerator Setup()
    {
        var listCor = LoadListFromWeb(abListPath);

        yield return(listCor);

        bundleList = listCor.Current as AssetBundleList;

        loader = new AssetBundleLoader(identity => abDlPath + "1.0.0/");
        loader.UpdateAssetBundleList(bundleList);

        var cleaned = loader.CleanCachedAssetBundles();

        if (!cleaned)
        {
            Fail("clean cache failed.");
        }
    }
Exemplo n.º 4
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.");
        }
    }
Exemplo n.º 5
0
 public void Teardown()
 {
     loader.CleanCachedAssetBundles();
 }