Ejemplo n.º 1
0
        //載入資源列表
        private void LoadVersion(string versionName)
        {
#if UNITY_TVOS && !UNITY_EDITOR
            string path = Application.temporaryCachePath + "/" + TinyContext.Instance.LanguagePath + "/" + "Versions/";
#else
            string path = Application.persistentDataPath + "/" + TinyContext.Instance.LanguagePath + "/" + "Versions/";
#endif
            byte[] datas = TFile.Load(path, versionName);

            if (datas == null)
            {
                return;
            }

            string     json = System.Text.UTF8Encoding.UTF8.GetString(datas);
            rMD5Info[] info = TJson.DeserializeObject <rMD5Info[]>(json);
            if (mRecordMap != null)
            {
                mRecordMap.Clear();
            }
            else
            {
                mRecordMap = new Dictionary <string, string>();
            }
            for (int i = 0; i < info.Length; i++)
            {
                mRecordMap.Add(info[i].FlieName, info[i].MD5Code);
            }

            return;
        }