study/first_study/Library/PackageCache/com.unity.collab-proxy@1ec4e416a4af/Editor/UVCSMenuItem.cs
jh04010421 739d49f1a0 Unity | 2026.01.20
수업 실습 파일
2026-01-20 11:01:57 +09:00

35 lines
995 B
C#

using UnityEditor;
using Unity.PlasticSCM.Editor.UI;
namespace Unity.PlasticSCM.Editor
{
internal static class UVCSMenuItem
{
#if UNITY_6000_1_OR_NEWER
[MenuItem(MENU_ITEM_NAME, false, 0)]
#else
// Display the menu item in alphabetical order,
// after Window/Search and before Window/Asset Store
[MenuItem(MENU_ITEM_NAME, false, 1301)]
#endif
static void ShowUVCSWindow()
{
SwitchUVCSPlugin.OnIfNeeded(UVCSPlugin.Instance);
}
[MenuItem(MENU_ITEM_NAME, true)]
static bool ValidateMenu()
{
return !VCSBuiltInPlugin.IsAnyProviderEnabled();
}
const string MENU_ITEM_NAME =
#if UNITY_6000_1_OR_NEWER
// The Window menu was refactored in Unity 6000.1.0a4 to host both UVCS & External providers (Perforce)
"Window/Version Control/" + UnityConstants.UVCS_WINDOW_TITLE;
#else
"Window/" + UnityConstants.UVCS_WINDOW_TITLE;
#endif
}
}