public AssetBundleInfo LoadImm(string path) { AssetBundleLoader assetBundleLoader = this.CreateLoader(XSingleton <XCommon> .singleton.XHashLower(path), path); if (assetBundleLoader == null) { return(null); } this._thisTimeLoaderSet.Add(assetBundleLoader); if (assetBundleLoader.isComplete) { return(assetBundleLoader.bundleInfo); } this._isCurrentLoading = true; if (assetBundleLoader.state < LoadState.State_Loading) { this._nonCompleteLoaderSet.Add(assetBundleLoader); } this.StartLoadImm(); return(assetBundleLoader.bundleInfo); }
private void LoadDepends() { if (this.depLoaders == null) { this.depLoaders = new AssetBundleLoader[this.bundleData.dependencies.Length]; for (int i = 0; i < this.bundleData.dependencies.Length; i++) { this.depLoaders[i] = this.bundleManager.CreateLoader(this.bundleData.dependencies[i], null); } } this._currentLoadingDepCount = 0; for (int j = 0; j < this.depLoaders.Length; j++) { AssetBundleLoader assetBundleLoader = this.depLoaders[j]; if (!assetBundleLoader.isComplete) { this._currentLoadingDepCount++; AssetBundleLoader expr_84 = assetBundleLoader; expr_84.onComplete = (AssetBundleManager.LoadAssetCompleteHandler)Delegate.Combine(expr_84.onComplete, new AssetBundleManager.LoadAssetCompleteHandler(this.OnDepComplete)); assetBundleLoader.Load(); } } this.CheckDepComplete(); }
internal void LoadError(AssetBundleLoader loader) { this.LoadComplete(loader); }