예제 #1
0
        /// <summary>
        /// 加载资源映射表
        /// </summary>
        /// <returns></returns>
        private IEnumerator LoadResIndexData()
        {
            Thread tThread = AssetTotalInfo.CreateByThread((pData) => { mAssetTotalInfo = pData; });

            while (tThread.ThreadState != ThreadState.Stopped)
            {
                yield return(null);
            }
        }
예제 #2
0
        public static Thread CreateByThread(Action <AssetTotalInfo> pAssetTotalInfo)
        {
            string tFilePath = PathHelper.ResIndexDataFilePath;

            Thread tThread = new Thread(() =>
            {
                string tText = File.ReadAllText(tFilePath);

                AssetTotalInfo tAssetTotalInfo = new AssetTotalInfo();

                tAssetTotalInfo.mAssetPathDic = LitJson.JsonMapper.ToObject <Dictionary <string, string> >(tText);

                pAssetTotalInfo(tAssetTotalInfo);
            });

            tThread.Start();

            return(tThread);
        }