public static void ExportBundlesEx() { ExportScenesManager.AutoSwitchTarget(); var dirs = Directory.GetDirectories(ExportScenesManager.GetFolderPath(ExportScenesManager.ExportPath)); //if (files.Length != 0) //{ var currentVersion = new VersionCodeInfo("0.0.0.1"); foreach (var item in dirs) { var fileVersion = new VersionCodeInfo(new DirectoryInfo(item).Name); if (fileVersion.Compare(currentVersion) > 0) { currentVersion = fileVersion; } } //var m_currentVersion = currentVersion.GetLowerVersion(); var m_newVersion = currentVersion.ToString(); var m_newVersionFolder = Path.Combine(ExportScenesManager.GetFolderPath(ExportScenesManager.ExportPath), m_newVersion).Replace("\\", "/"); var targetPath = m_newVersionFolder + BuildProjectExWizard.ExportFilesPath; var selection = Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.DeepAssets); var paths = (from s in selection let path = AssetDatabase.GetAssetPath(s) where File.Exists(path) select path).ToArray(); foreach (string item in paths) { Debug.Log("ex " + item); ExportBundle(new string[] { item }, targetPath); } }
public bool IsDefault() { if (ProgramVersionInfo.Compare(new VersionCodeInfo("0.0.0.1")) == 0 && ResouceVersionInfo.Compare(new VersionCodeInfo("0.0.0.0")) == 0 && PackageList == String.Empty && PackageUrl == String.Empty && ApkUrl == String.Empty) { return(true); } else { return(false); } }
public static VersionCodeInfo GetNewVersionCode() { var dirs = Directory.GetDirectories(ExportScenesManager.GetFolderPath(ExportScenesManager.ExportPath)); var currentVersion = new VersionCodeInfo("0.0.0.1"); foreach (var item in dirs) { var fileVersion = new VersionCodeInfo(new DirectoryInfo(item).Name); if (fileVersion.Compare(currentVersion) > 0) currentVersion = fileVersion; } return currentVersion; }
//获得被拷贝出去的临时项目路径export下的最新导出版本,比如client_Temp1/Export/0.0.0.3 public static string GetNewVersionByTempClientPath(string path) { var dirs = Directory.GetDirectories(path); var currentVersion = new VersionCodeInfo("0.0.0.1"); foreach (var item in dirs) { var fileVersion = new VersionCodeInfo(new DirectoryInfo(item).Name); if (fileVersion.Compare(currentVersion) > 0) currentVersion = fileVersion; } return currentVersion.ToString(); }
public static void ExportBundlesEx() { ExportScenesManager.AutoSwitchTarget(); var dirs = Directory.GetDirectories(ExportScenesManager.GetFolderPath(ExportScenesManager.ExportPath)); //if (files.Length != 0) //{ var currentVersion = new VersionCodeInfo("0.0.0.1"); foreach (var item in dirs) { var fileVersion = new VersionCodeInfo(new DirectoryInfo(item).Name); if (fileVersion.Compare(currentVersion) > 0) currentVersion = fileVersion; } //var m_currentVersion = currentVersion.GetLowerVersion(); var m_newVersion = currentVersion.ToString(); var m_newVersionFolder = Path.Combine(ExportScenesManager.GetFolderPath(ExportScenesManager.ExportPath), m_newVersion).Replace("\\", "/"); var targetPath = m_newVersionFolder + BuildProjectExWizard.ExportFilesPath; var selection = Selection.GetFiltered(typeof(UnityEngine.Object), SelectionMode.DeepAssets); var paths = (from s in selection let path = AssetDatabase.GetAssetPath(s) where File.Exists(path) select path).ToArray(); foreach (string item in paths) { Debug.Log("ex "+item); ExportBundle(new string[] { item }, targetPath); } }