Esempio n. 1
0
        /// <summary>
        /// 将只读区版本文件初始化到可写区
        /// </summary>
        private void InitVersionFileFormStreamingAssetsToLocal()
        {
            GameEntry.Log(LogCategory.Resource, "InitVersionFileFormStreamingAssetsToLocal");

            m_LocalAssetsVersionDic = new Dictionary <string, AssetBundleInfoEntity>();

            var enumerator = m_StreamingAssetsVersionDic.GetEnumerator();

            while (enumerator.MoveNext())
            {
                AssetBundleInfoEntity entity = enumerator.Current.Value;
                m_LocalAssetsVersionDic[enumerator.Current.Key] = new AssetBundleInfoEntity()
                {
                    AssetBundleName = entity.AssetBundleName,
                    MD5             = entity.MD5,
                    Size            = entity.Size,
                    IsFirstData     = entity.IsFirstData,
                    IsEncrypt       = entity.IsEncrypt
                };
            }

            //保存版本文件
            LocalAssetsManager.SaveVersionFile(m_LocalAssetsVersionDic);

            //保存版本号
            m_LocalAssetsVersion = m_StreamingAssetsVersion;
            LocalAssetsManager.SetResourceVersion(m_LocalAssetsVersion);
        }
Esempio n. 2
0
 /// <summary>
 /// 保存资源版本号(用于检查版本更新完毕后 保存)
 /// </summary>
 public void SetResourceVersion()
 {
     m_LocalAssetsVersion = m_CDNVersion;
     LocalAssetsManager.SetResourceVersion(m_LocalAssetsVersion);
 }