Ejemplo n.º 1
0
    private Autoya.ShouldRequestOrNot RequestYes(string identity, string newVersion)
    {
        var basePath = Autoya.Manifest_LoadRuntimeManifest().resourceInfos.Where(resInfo => resInfo.listIdentity == identity).FirstOrDefault().listDownloadUrl;
        var url      = basePath + "/" + identity + "/" + AssetBundlesSettings.PLATFORM_STR + "/" + newVersion + "/" + identity + ".json";

        return(Autoya.ShouldRequestOrNot.Yes(url));
    }
Ejemplo n.º 2
0
    public IEnumerator ReceiveUpdatedListThenListWillBeUpdatedThenRestore()
    {
        var defaultDesc = Autoya.Manifest_LoadRuntimeManifest().ToString();

        yield return(ReceiveUpdatedListThenListWillBeUpdated());

        // list is updated. RuntieManifest too.
        var updatedDesc = Autoya.Manifest_LoadRuntimeManifest().ToString();

        True(defaultDesc != updatedDesc, "defaultDesc:" + defaultDesc + "\nupdatedDesc:" + updatedDesc);

        {
            var done = false;
            Autoya.AssetBundle_FactoryReset(
                () =>
            {
                done = true;
            },
                (error, reason) =>
            {
                Fail("err:" + error + " reason:" + reason);
            }
                );
            yield return(WaitUntil(
                             () => done,
                             () => { throw new TimeoutException("timeout."); }
                             ));
        }

        var resettedDesc = Autoya.Manifest_LoadRuntimeManifest().ToString();

        True(resettedDesc == defaultDesc);

        {
            var done = false;
            Autoya.AssetBundle_DownloadAssetBundleListFromUrlManually(
                abListPath + "main_assets/" + AssetBundlesSettings.PLATFORM_STR + "/1.0.0/main_assets.json",
                status =>
            {
                done = true;
            },
                (code, reason, autoyaStatus) =>
            {
                // do nothing.
            }
                );

            yield return(WaitUntil(
                             () => done,
                             () => { throw new TimeoutException("faild to get assetBundleList."); }
                             ));
        }
    }