public void RemoveAssetRequest(LocalAssetRequest request) { if (!this.m_listAssetRequest.Remove(request)) { AssetLogger.Error("false == m_listAssetRequest.Remove(assetRequest):"); } }
public void DetectComplete() { if (!this.m_HasCallBack && this.DetectAllHasFinished()) { if (this.m_assetResource != null) { AssetLogger.Debug("Asset: DetectComplete:" + this.m_assetResource.URL); } else { AssetLogger.Error("Asset: DetectComplete: null == m_assetResource"); } this.m_HasCallBack = true; //设置加载完成 this.DebugError(); //打印出出错的资源 this.LoadMainAsset(); /*Debug.Log("Main:" + this.m_assetResource.MainAsset); * for (int j = 0; j < this.m_depAssetResources.Length; j++) * { * Debug.Log("dep:" + this.m_depAssetResources[j].MainAsset); * } */ try { for (int i = 0; i < this.m_listAssetRequest.Count; i++) { LocalAssetRequest request = this.m_listAssetRequest[i]; request.OnAssetRequestFinishedHandler(this.m_assetResource);//执行资源加载完成之后的委托 } } catch (Exception e) { AssetLogger.Fatal(e.ToString()); } this.UnloadAssetBundle(); } }
public void AddAssetRequest(LocalAssetRequest request) { this.m_listAssetRequest.Add(request); }