internal LoadReturnArgs(AssetBundleFeature feature, long taskid) { _cacheFeature = feature; TaskId = taskid; _loadCallback = null; _progressEvent = null; }
void ExitScene(Scene scene) { if (AssetBundleConfig.DebugMode.HasEnum(DebugMode.Detail)) { Debug.LogFormat("ExitScene {0} at {1}", scene.name, Time.frameCount); } AssetBundleFeature assetfeature = Parent as AssetBundleFeature; if (assetfeature != null) { var context = assetfeature.StartRead(); AssetBundleInfo info; if (context.Cache.TryGetInfo(scene.path, out info)) { GameAssetBundle gameAssetBundle; if (context.Cache.GetAssetBundle(info.AssetBundleName, out gameAssetBundle)) { AssetBundleFunction.RemoveRef(ref context, ref gameAssetBundle); assetfeature.EndRead(ref context); } } } else { Debug.LogError("assetfeature is Null"); } }
void Awake() { if (mIns != null) { throw new ArgumentException("Multi Load Manger"); } mIns = this; DontDestroyOnLoad(gameObject); Debug.logger.logEnabled = AssetBundleConfig.DebugMode.HasEnum(DebugMode.Log); if (_assetBundleFeature == null) { _assetBundleFeature = new AssetBundleFeature(); } }
void AddRefrence(ref AssetBundleInfo assetbundleinfo, Object target) { AssetBundleFeature assetfeature = Parent as AssetBundleFeature; if (assetfeature != null) { var context = assetfeature.StartRead(); AssetBundleFunction.AddAssetBundleRef(ref context, ref assetbundleinfo, assetbundleinfo.AssetBundleName, target); assetfeature.EndRead(ref context); } else { Debug.LogError("assetfeature is Null"); } }
IEnumerator ParseRemote(string url) { yield return(_remote.Init(url)); if (_remote.IsDone) { AssetBundleFeature assetfeature = Parent as AssetBundleFeature; if (assetfeature != null) { var context = assetfeature.StartRead(); context.Cache.InitRemote(_remote); _remote = null; assetfeature.EndRead(ref context); } } Block = false; }
IEnumerator TryRead(IParseDependencyReader reader, string filepath) { yield return(reader.ReadAsync(filepath)); AssetBundleFeature assetfeature = Parent as AssetBundleFeature; if (assetfeature != null) { DefaultParseDepReader depReader = reader as DefaultParseDepReader; if (depReader != null) { AssetBundleContext context = assetfeature.StartRead(); context.Cache.Load(depReader.AsyncResultList); ListPool <AssetBundleInfo> .Release(depReader.AsyncResultList); depReader.AsyncResultList = null; assetfeature.EndRead(ref context); } } Block = false; }