Exemple #1
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();
            }
        }
Exemple #2
0
 public AssetBundleCache(LoaderTask task)
 {
     m_task = task;
 }
Exemple #3
0
 /// <summary>
 /// 构造
 /// </summary>
 /// <param name="task">加载任务</param>
 public LoaderGroup(LoaderTask task)
 {
     m_task = task;
 }