A game about forced loneliness, made by TACStudios
1using UnityEditor;
2using Unity.PlasticSCM.Editor.UI;
3
4namespace Unity.PlasticSCM.Editor
5{
6 internal static class PlasticMenuItem
7 {
8#if UNITY_6000_1_OR_NEWER
9 [MenuItem(MENU_ITEM_NAME, false, 0)]
10#else
11 [MenuItem(MENU_ITEM_NAME, false)]
12#endif
13 static void ShowPanel()
14 {
15 PlasticPlugin.OpenPlasticWindowDisablingOfflineModeIfNeeded();
16 }
17
18 [MenuItem(MENU_ITEM_NAME, true)]
19 static bool ValidateMenu()
20 {
21 return !VCSPlugin.IsAnyProviderEnabled();
22 }
23
24 // The Window menu was refactored in Unity 6000.1.0a4 to host both UVCS & External providers (Perforce)
25 const string MENU_ITEM_NAME =
26#if UNITY_6000_1_OR_NEWER
27 "Window/Version Control/" + UnityConstants.PLASTIC_WINDOW_TITLE;
28#else
29 "Window/" + UnityConstants.PLASTIC_WINDOW_TITLE;
30#endif
31 }
32}