示例#1
0
        public bool CacheAssetBundle(GOEBundleResource bundle)
        {
            if (!cachedBundles.ContainsKey(bundle.Name))
            {
                cachedBundles[bundle.Name] = bundle;
                cachedSize += bundle.Size;
                bundle.Touch();

                /*#if DEBUG_BUNDLE_CACHE
                 *              Debug.Log(string.Format("{2:0.##}:Bundle {0} cached, new CacheSize={1:0.##}MB", bundle.Name, cachedSize / 1024f / 1024f, Time.realtimeSinceStartup));
                 #endif*/
                needGC = true;
                return(true);
            }
            return(false);
        }