public void Unload() { if (assetBundle) { assetBundle.Unload(false); } state = CacheDataState.Unloaded; #if HUGULA_CACHE_DEBUG GS_GameLog.LogFormat("Unload CacheData({0})),frame={1} ", assetBundleName, Time.frameCount); #endif }
public void Dispose() { #if HUGULA_CACHE_DEBUG GS_GameLog.LogFormat("Dispose CacheData({0},)),frame={1} ", assetBundleName, Time.frameCount); #endif if (assetBundle) { assetBundle.Unload(true); } assetBundle = null; state = CacheDataState.Empty; assetBundleName = string.Empty; count = 0; }
public void DispatchComplete() { #if HUGULA_PROFILER_DEBUG // Profiler.BeginSample (string.Format ("CRequest({0},{1}).DispatchComplete()", this.assetName, this.key)); if (OnComplete != null) { OnComplete(data, userData); } // Profiler.EndSample (); watch.Stop(); GS_GameLog.LogFormat("CRequest({0},{1}).data = {2} cost={3}s", this.assetBundleName, this.assetName, this.data, watch.ElapsedMilliseconds / 1000d); #else if (OnComplete != null) { OnComplete(data, userData); } #endif }