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

53 lines
1.7 KiB
C#

using System;
using UnityEditor;
using Unity.PlasticSCM.Editor.CloudDrive;
namespace Unity.PlasticSCM.Editor.UI
{
internal static class ShowWindow
{
// This legacy method is kept for backward compatibility with the Build Automation package
// (it was the only method up to com.unity.collab-proxy "2.8.2")
// UUM-115391 "Failed to open UVCS Window" error is thrown [...] settings in Build Profiles
internal static UVCSWindow Plastic()
{
return UVCS();
}
internal static UVCSWindow UVCS()
{
UVCSWindow window = EditorWindow.GetWindow<UVCSWindow>(
UnityConstants.UVCS_WINDOW_TITLE,
true,
mConsoleWindowType,
mProjectBrowserType);
window.titleContent.image = Images.ResizeTextureForWindowTitleContent(
UVCSPlugin.Instance.GetPluginStatusIcon());
return window;
}
internal static CloudDriveWindow CloudDrive()
{
CloudDriveWindow window = EditorWindow.GetWindow<CloudDriveWindow>(
UnityConstants.CloudDrive.WINDOW_TITLE,
true,
mConsoleWindowType,
mProjectBrowserType);
window.titleContent.image = Images.ResizeTextureForWindowTitleContent(
Images.GetCloudDriveViewIcon());
return window;
}
static Type mConsoleWindowType = typeof(EditorWindow).
Assembly.GetType("UnityEditor.ConsoleWindow");
static Type mProjectBrowserType = typeof(EditorWindow).
Assembly.GetType("UnityEditor.ProjectBrowser");
}
}