Files
Test-Multiplayer/Library/PackageCache/com.unity.collab-proxy@1e5e48aff19d/Editor/SwitchUVCSPlugin.cs
pelpanagiotis 329b7d3183 First Commit
2025-12-21 18:31:02 +02:00

36 lines
810 B
C#

using Unity.PlasticSCM.Editor.UI;
namespace Unity.PlasticSCM.Editor
{
internal static class SwitchUVCSPlugin
{
internal static UVCSWindow On(UVCSPlugin uvcsPlugin)
{
uvcsPlugin.Enable();
UVCSWindow window = ShowWindow.UVCS();
UVCSPluginIsEnabledPreference.Enable();
return window;
}
internal static UVCSWindow OnIfNeeded(UVCSPlugin uvcsPlugin)
{
if (!UVCSPluginIsEnabledPreference.IsEnabled())
return On(uvcsPlugin);
return ShowWindow.UVCS();
}
internal static void Off(UVCSPlugin uvcsPlugin)
{
UVCSPluginIsEnabledPreference.Disable();
CloseWindowIfOpened.UVCS();
uvcsPlugin.Shutdown();
}
}
}