Exemplo n.º 1
0
        /// <summary>
        /// 将记录中临时资源的路径替换为原始资源路径
        /// 包括:
        /// 1.打包过程中在Resources_temp下生成的临时文件
        /// 2.UI预处理过程中产生的临时文件
        /// </summary>
        /// <param name="k"></param>
        /// <returns></returns>
        private static string ReplaceTemparyPath(string tempPath)
        {
            ///处理含有Resource_temp的路径
            string result = tempPath.Replace(TemporaryAssetHelper.RESOURCES_TEMP, TemporaryAssetHelper.RESOURCES);

            //处理含有UI_{BuildTarget}的路径
            result = result.Replace(UIPrefabProcessor.GetShadowPrefabFolderRoot(), UIPrefabProcessor.UI_PREFAB_ROOT);
            return(result);
        }
Exemplo n.º 2
0
        private static void BuildAssets(List <string> selectedPathList)
        {
            //获取资源分离后的路径
            Dictionary <string, List <List <string> > > splitPathListListDict = GetSplitPathListListDict(selectedPathList);

            AssetDatabase.SaveAssets();
            BuildAssets(splitPathListListDict);
            AssetRecordHelper.WriteAssetRecord();
            AssetBundleBuilder.BuildAssetRecord();
            //TemporaryAssetHelper.DeleteAllTempAsset();
            if (AssetBuildStrategyManager.isSaveUIMediate == false)
            {
                UIPrefabProcessor.DeleteMediate();
            }
            AssetBundleBuilder.LogBuildResult();
        }
Exemplo n.º 3
0
 /// <summary>
 /// 预处理UIPrefab,实际打包资源是使用图集资源的UIPrefab
 /// </summary>
 /// <param name="path"></param>
 /// <returns></returns>
 private static string PreprocessUIPrefab(string path)
 {
     return(UIPrefabProcessor.Process(path));
 }