Exemplo n.º 1
0
        private void ReadyLoaderAndPreloader()
        {
            // initialize AssetBundleLoader.
            {
                AssetBundleLoader.HttpResponseHandlingDelegate httpResponseHandlingDel = (p1, p2, p3, p4, p5, p6, p7) => {
                    httpResponseHandlingDelegate(p1, p2, p3, p4, p5, p6, p7);
                };
                AssetBundleLoader.AssetBundleGetRequestHeaderDelegate assetBundleGetRequestHeaderDel = (p1, p2) => {
                    return(assetBundleGetRequestHeaderDelegate(p1, p2));
                };

                _assetBundleLoader = new AssetBundleLoader(GetAssetBundleListVersionedBasePath(AssetBundlesSettings.ASSETBUNDLES_URL_DOWNLOAD_ASSET), _currentAssetBundleList, assetBundleGetRequestHeaderDel, httpResponseHandlingDel);
            }

            // initialize AssetBundlePreloader.
            {
                AssetBundlePreloader.HttpResponseHandlingDelegate httpResponseHandlingDel = (p1, p2, p3, p4, p5, p6, p7) => {
                    httpResponseHandlingDelegate(p1, p2, p3, p4, p5, p6, p7);
                };
                AssetBundlePreloader.AssetBundleGetRequestHeaderDelegate assetBundleGetRequestHeaderDel = (p1, p2) => {
                    return(assetBundleGetRequestHeaderDelegate(p1, p2));
                };

                _assetBundlePreloader = new AssetBundlePreloader(assetBundleGetRequestHeaderDel, httpResponseHandlingDel);
            }
        }
Exemplo n.º 2
0
        private void ReadyLoaderAndPreloader(AssetBundleList list)
        {
            // initialize/reload AssetBundleLoader.
            {
                if (_assetBundleLoader == null)
                {
                    AssetBundleLoader.HttpResponseHandlingDelegate httpResponseHandlingDel = (p1, p2, p3, p4, p5, p6, p7) =>
                    {
                        httpResponseHandlingDelegate(p1, p2, p3, p4, p5, p6, p7);
                    };

                    AssetBundleLoader.AssetBundleGetRequestHeaderDelegate assetBundleGetRequestHeaderDel = (p1, p2) =>
                    {
                        return(assetBundleGetRequestHeaderDelegate(p1, p2));
                    };

                    _assetBundleLoader = new AssetBundleLoader(OnAssetBundleDownloadUrlRequired, assetBundleGetRequestHeaderDel, httpResponseHandlingDel);
                }

                _assetBundleLoader.UpdateAssetBundleList(list);
            }

            // initialize AssetBundlePreloader.
            {
                if (_assetBundlePreloader != null)
                {
                    // do nothing.
                }
                else
                {
                    AssetBundlePreloader.HttpResponseHandlingDelegate httpResponseHandlingDel = (p1, p2, p3, p4, p5, p6, p7) =>
                    {
                        httpResponseHandlingDelegate(p1, p2, p3, p4, p5, p6, p7);
                    };

                    AssetBundlePreloader.AssetBundleGetRequestHeaderDelegate assetBundleGetRequestHeaderDel = (p1, p2) =>
                    {
                        return(assetBundlePreloadListGetRequestHeaderDelegate(p1, p2));
                    };

                    _assetBundlePreloader = new AssetBundlePreloader(assetBundleGetRequestHeaderDel, httpResponseHandlingDel);
                }
            }
        }