Exemplo n.º 1
0
        public void AddRecord(MoveOutResourcesInfor infor)
        {
            for (int dex = 0; dex < m_AllWillMoveInAssetPath.Count; ++dex)
            {
                if (m_AllWillMoveInAssetPath[dex].AssetDestinationTopDirectoryPath == infor.AssetDestinationTopDirectoryPath &&
                    m_AllWillMoveInAssetPath[dex].AssetSourceTopDirectoryPath == infor.AssetSourceTopDirectoryPath)
                {
                    Debug.LogError("AddRecord Fail,Allready Record " + infor);
                    return;
                }
            }


            m_AllWillMoveInAssetPath.Add(infor);
        }
Exemplo n.º 2
0
        /// <summary>
        /// 根据目录移动目录中所有的资源
        /// </summary>
        /// <param name="realPath"></param>
        /// <param name="relativePath"></param>
        /// <param name="languageDirectory">当不需要增加多语言目录时候为null 即可</param>
        /// <returns></returns>
        private static bool TryMoveDirectory(string realPath, string relativePath, string languageDirectory)
        {
            if (string.IsNullOrEmpty(languageDirectory) == false)
            {
                relativePath = string.Format("{0}/{1}", relativePath, languageDirectory); //增加一个语言目录
            }
            if (System.IO.Directory.Exists(realPath) == false)
            {
                Debug.LogError("GetMulitLanguageResourceConfig Fail ,path Not Exit " + relativePath);
                return(false);
            }

            //    string parentDirectory = IoUtility.Instance.GetDirectoryParentDcirectory(realPath);  //获取参数路径的父级目录
            string storePath = string.Format("{0}/{1}", EditorDefine.S_BuildAppMultLanguageTempStorePath, relativePath);

            MoveOutResourcesInfor infor = new MoveOutResourcesInfor(realPath, storePath);

            S_MoveOutResourceaRecordInfor.AddRecord(infor); //记录数据
            IoUtility.Instance.ForceMoveDirectoryFile(realPath, storePath);
            return(true);
        }