Skip to content

Commit

Permalink
Added separate 'Preferences' menu item and set 'Version' option to re…
Browse files Browse the repository at this point in the history
…direct to the currently installed release page (#552)
  • Loading branch information
popara96 authored Aug 6, 2023
1 parent 05824cc commit 774278f
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions src/NuGetForUnity/Editor/NugetWindow.cs
Original file line number Diff line number Diff line change
Expand Up @@ -239,15 +239,23 @@ protected static void RestorePackages()
}

/// <summary>
/// Displays the version number of NuGetForUnity.
/// Opens the preferences window.
/// </summary>
[MenuItem("NuGet/Version " + NugetPreferences.NuGetForUnityVersion, false, 10)]
protected static void DisplayVersion()
[MenuItem("NuGet/Preferences", false, 9)]
protected static void DisplayPreferences()
{
// open the preferences window
SettingsService.OpenUserPreferences("Preferences/NuGet For Unity");
}

/// <summary>
/// Opens release notes for the current version.
/// </summary>
[MenuItem("NuGet/Version " + NugetPreferences.NuGetForUnityVersion + " \uD83D\uDD17", false, 10)]
protected static void DisplayVersion()
{
Application.OpenURL($"{GitHubReleasesPageUrl}/tag/v{NugetPreferences.NuGetForUnityVersion}");
}

/// <summary>
/// Checks/launches the Releases page to update NuGetForUnity with a new version.
/// </summary>
Expand Down

0 comments on commit 774278f

Please sign in to comment.