Skip to content

Commit

Permalink
[增加]1. 增加更新包提示
Browse files Browse the repository at this point in the history
  • Loading branch information
AlianBlank committed Dec 24, 2024
1 parent c17b94b commit e2bc709
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Editor/UpdatePackages/UpdateAllPackageHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,12 @@ public static class UpdateAllPackageHelper
[MenuItem("GameFrameX/Update All Packages", false, 2000)]
public static void UpdatePackages()
{
string manifestPath = Path.Combine(Application.dataPath, "..", "Packages", "manifest.json");
UpdatePackagesFromManifest(manifestPath);
var result = EditorUtility.DisplayDialog("更新包提示", "是否更新所有包?\n 更新完成之后需要重启Unity", "是", "否");
if (result)
{
var manifestPath = Path.Combine(Application.dataPath, "..", "Packages", "manifest.json");
UpdatePackagesFromManifest(manifestPath);
}
}

private static void UpdatePackagesFromManifest(string manifestPath)
Expand Down

0 comments on commit e2bc709

Please sign in to comment.