protected virtual void Error() { _hasError = true; this.state = FastLoadState.State_Error; this.bundleInfo = null; FireEvent(); }
/// <summary> /// 检查是否已经完成了所有的依赖项加载,如果完成了所有的依赖项加载就开始加载自己本身,否则就继续等待其他依赖项加载 /// </summary> /// <param name="abi"></param> void OnDepComplete(FastAssetBundleInfo abi) { //依赖项都加在完了,开始加载自己 if (CheckDepComplete()) { StartLoadSelfBundle(); } }
internal FastAssetBundleInfo CreateBundleInfo(FastAssetBundleLoader loader, FastAssetBundleInfo abi = null, AssetBundle assetBundle = null) { if (abi == null) { abi = new FastAssetBundleInfo(); } abi.bundleName = loader.bundleName.ToLower(); abi.bundle = assetBundle; return(abi); }
protected virtual void Complete() { if (bundleInfo == null) { this.state = FastLoadState.State_Complete; this.bundleInfo = bundleManager.CreateBundleInfo(this, null, _bundle); this.bundleInfo.isReady = true; this.bundleInfo.onUnloaded = OnBundleUnload; _bundle = null; } FireEvent(); }
private void OnBundleUnload(FastAssetBundleInfo abi) { this.bundleInfo = null; this.state = FastLoadState.State_None; }