Exemplo n.º 1
0
        static private async Task LoadManifest()
        {
            string streamingAssetsStr     = "StreamingAssets";
            string assetBundleManifestStr = "AssetBundleManifest";
            WWW    www = new WWW(ResourceURL.GetUrl(streamingAssetsStr));

            await new WaitUntil(() => www.isDone);
            AssetBundle manifestBundle = www.assetBundle;

            mManifest = (AssetBundleManifest)manifestBundle.LoadAsset(assetBundleManifestStr, typeof(AssetBundleManifest));
            manifestBundle.Unload(false);
            www.Dispose();
            //TODO ADD ART WORK SPACE

            WWW www1 = new WWW(ResourceURL.GetExternalUrl(streamingAssetsStr));

            await new WaitUntil(() => www1.isDone);
            AssetBundle manifestBundle1 = www1.assetBundle;

            mExternalManifest = (AssetBundleManifest)manifestBundle1.LoadAsset(assetBundleManifestStr, typeof(AssetBundleManifest));
            manifestBundle1.Unload(false);
            www1.Dispose();
            mCallBackDelegate();
            //  mInitCallback.Call();
            mCallBackDelegate = null;
        }
Exemplo n.º 2
0
        static async public Task Init()
        {
            await LoadManifest(ResourceURL.GetUrl("StreamingAssets"));

            //TODO ADD ART WORK SPACE
            await LoadExternaManifest(ResourceURL.GetExternalUrl("StreamingAssets"));

            return;
        }