示例#1
0
        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
        }
示例#2
0
        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;
        }
示例#3
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
        }