コード例 #1
0
        public void Init(IHotUpdatePath pather, IOriginAssetBundleUtil originConstData, IAssetConstUtil assetConstUtil)
        {
//            Debug.Log(assetConstUtil.GetType().FullName);
            Assert.IsNotNull(assetConstUtil);
            Assert.IsNotNull(assetConstUtil.NameToPath);
            this._assetConstUtil = assetConstUtil;
        }
コード例 #2
0
 internal AssetBundleLoaderTool(Action <AssetBundle> onLoadEveryComplete, AssetBundleDownLoader version,
                                IHotUpdatePath updatePath, IOriginAssetBundleUtil originAssetBundleUtil)
 {
     this.pather = updatePath;
     this.onLoadEveryComplete    = onLoadEveryComplete;
     this.version                = version;
     this._originAssetBundleUtil = originAssetBundleUtil;
 }
        public static void Init(IResourceLoader resourceLoader, IHotUpdatePath pather,
                                IOriginAssetBundleUtil originConstData, IAssetConstUtil assetConstUtil)
        {
            Assert.IsNotNull(resourceLoader);
            _resourceLoader = resourceLoader;
//            Debug.Log("初始化");
            _resourceLoader.Init(pather, originConstData, assetConstUtil);
        }
コード例 #4
0
 public void Init(IHotUpdatePath pather, IOriginAssetBundleUtil originConstData, IAssetConstUtil assetConstUtil)
 {
     if (null == pather)
     {
         return;
     }
     if (null == originConstData)
     {
         return;
     }
     this.originBundleConst = originConstData;
     this.pather            = pather;
     assetBundleLoader      = new AssetBundleLoader();
     MainLoop.Instance.StartCoroutine(assetBundleLoader.StartBundleManager(pather, originConstData));
 }
コード例 #5
0
        /// <summary>
        /// 开启整个工作流程
        /// </summary>
        /// <returns></returns>
        internal IEnumerator StartBundleManager(IHotUpdatePath pather, IOriginAssetBundleUtil originAssetBundleUtil = null)
        {
            this._originAssetBundleUtil = originAssetBundleUtil;

            manifestReader = new ManifestReader(pather);
            yield return(manifestReader.LoadManifest());

            if (!string.IsNullOrEmpty(pather.WebServeMainManifest))
            {
                assetBundleDownLoader = new AssetBundleDownLoader(pather);
            }

            loadLoaderTool = new AssetBundleLoaderTool(OnAddAssetBundle, assetBundleDownLoader, pather, originAssetBundleUtil);

            if (!string.IsNullOrEmpty(pather.WebServeMainManifest))
            {
                yield return(assetBundleDownLoader.CheckVersionAndUpdate());
            }
        }
コード例 #6
0
 internal ManifestReader(IHotUpdatePath updatePath)
 {
     this.pather = updatePath;
 }
コード例 #7
0
 internal AssetBundleDownLoader(IHotUpdatePath pather)
 {
     this.pather = pather;
     Assert.IsFalse(string.IsNullOrEmpty(pather.WebServeMainManifest));
     bundleDownloaderTool = new BundleDownloaderTool(OnDownloadCompleteF, OnAllResourceFine, pather);
 }
コード例 #8
0
 internal BundleDownloaderTool(Action onDownloadComplete, Action onAllFine, IHotUpdatePath pather)
 {
     OnDownloadComplete = onDownloadComplete;
     OnAllFine          = onAllFine;
     this.pather        = pather;
 }