static public int constructor(IntPtr l)
 {
     try {
                     #if DEBUG
         var    method     = System.Reflection.MethodBase.GetCurrentMethod();
         string methodName = GetMethodName(method);
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.BeginSample(methodName);
                     #else
         Profiler.BeginSample(methodName);
                     #endif
                     #endif
         UnityEngine.Cache o;
         o = new UnityEngine.Cache();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
             #if DEBUG
     finally {
                     #if UNITY_5_5_OR_NEWER
         UnityEngine.Profiling.Profiler.EndSample();
                     #else
         Profiler.EndSample();
                     #endif
     }
             #endif
 }
Пример #2
0
 static public int constructor(IntPtr l)
 {
     try {
         UnityEngine.Cache o;
         o = new UnityEngine.Cache();
         pushValue(l, true);
         pushValue(l, o);
         return(2);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Пример #3
0
        public LoadMgr()
        {
            if (ConstantData.EnableCache)
            {
                Caching.compressionEnabled = false;

                string path = ConstantData.UnpackPath;
                FileHelper.CreateFileDirectory(path);

                UnityEngine.Cache cache = Caching.GetCacheByPath(path);
                if (!cache.valid)
                {
                    cache = Caching.AddCache(path);
                }

                Caching.currentCacheForWriting = cache;
            }
            else
            {
                if (ConstantData.EnablePatch)
                {
                    AddSearchPath(ConstantData.PatchPath);
                }

                if (ConstantData.EnableCustomCompress)
                {
                    AddSearchPath(ConstantData.UnpackPath);
                }
            }

            m_task            = new LoaderTask();
            m_cache           = new AssetBundleCache(m_task);
            m_downloadOrCache = new DownloadOrCache();

            Clear();

            if (ConstantData.EnableAssetBundle)
            {
                //LoadVersion();
            }
        }