少年修仙传客户端基础资源
client_Wu Xijin
2019-01-09 b1b453e5ed478092185aaba62f30c833645e95e5
5783 【1.4.100】【前端】根据不同的平台支持不同的资源读取
2个文件已修改
35 ■■■■■ 已修改文件
Assets/Editor/Tool/BuildExtersion.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/UpdateAssetBundleName.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
Assets/Editor/Tool/BuildExtersion.cs
@@ -15,6 +15,25 @@
            var buildParameters = new BuildParameters();
            if (!buildParameters.error)
            {
                var levelPattern = "001";
                var versionsFilePath = Application.dataPath + Path.DirectorySeparatorChar + "Editor/VersionConfigs/Versions.txt";
                var lines = File.ReadAllLines(versionsFilePath);
                for (int i = 2; i < lines.Length; i++)
                {
                    var line = lines[i];
                    var lineStrings = line.Split('\t');
                    if (lineStrings[0] == buildParameters.publisher)
                    {
                        levelPattern = lineStrings[22];
                        break;
                    }
                }
                if (!string.IsNullOrEmpty(levelPattern))
                {
                    UpdateLevelSetting.SetCreateRoleLevel(levelPattern);
                }
                UpdateLevelSetting.SetAllLevelAssetBundleName();
                ExcuteBuildAsset("maps", buildParameters);
            }
Assets/Editor/Tool/UpdateAssetBundleName.cs
@@ -267,6 +267,22 @@
    static string rootPath = Application.dataPath + "/Art/Maps/Scenes";
    static string assetPath = "Assets/Art/Maps/Scenes";
    public static void SetCreateRoleLevel(string pattern)
    {
        var root = Application.dataPath + "/Art/Maps/Scenes/Map_CreateRole";
        var from = Application.dataPath + "/Art/Maps/Scenes/Map_CreateRole/" + "CreateRole_" + pattern + ".unity";
        var to = Application.dataPath + "/Art/Maps/Scenes/" + "CreateRole_001.unity";
        if (File.Exists(from))
        {
            if (!File.Exists(to))
            {
                File.Delete(to);
            }
            File.Move(from, to);
        }
    }
    [MenuItem("程序/设置资源包名/更新Level(All) AssetBundleName")]
    public static void SetAllLevelAssetBundleName()
    {