| Assets/Editor/Tool/BuildExtersion.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| Assets/Editor/Tool/UpdateAssetBundleName.cs | ●●●●● 补丁 | 查看 | 原始文档 | 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() {