No Description
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ShowWindow.cs 1.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. using System;
  2. using UnityEditor;
  3. namespace Unity.PlasticSCM.Editor.UI
  4. {
  5. internal static class ShowWindow
  6. {
  7. internal static PlasticWindow Plastic()
  8. {
  9. return ShowPlasticWindow(false);
  10. }
  11. internal static PlasticWindow PlasticAfterDownloadingProject()
  12. {
  13. return ShowPlasticWindow(true);
  14. }
  15. static PlasticWindow ShowPlasticWindow(bool disableCollabWhenLoaded)
  16. {
  17. PlasticWindow window = EditorWindow.GetWindow<PlasticWindow>(
  18. UnityConstants.PLASTIC_WINDOW_TITLE,
  19. true,
  20. mConsoleWindowType,
  21. mProjectBrowserType);
  22. if (disableCollabWhenLoaded)
  23. window.DisableCollabIfEnabledWhenLoaded();
  24. window.SetupWindowTitle(PlasticNotification.Status.None);
  25. return window;
  26. }
  27. static Type mConsoleWindowType = typeof(EditorWindow).
  28. Assembly.GetType("UnityEditor.ConsoleWindow");
  29. static Type mProjectBrowserType = typeof(EditorWindow).
  30. Assembly.GetType("UnityEditor.ProjectBrowser");
  31. }
  32. }