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.

VCSPlugin.cs 835B

12345678910111213141516171819202122232425262728293031323334353637
  1. using UnityEditor;
  2. namespace Unity.PlasticSCM.Editor
  3. {
  4. internal static class VCSPlugin
  5. {
  6. internal static bool IsEnabled()
  7. {
  8. return GetVersionControl() == "PlasticSCM";
  9. }
  10. internal static void Disable()
  11. {
  12. SetVersionControl("Visible Meta Files");
  13. AssetDatabase.SaveAssets();
  14. }
  15. static string GetVersionControl()
  16. {
  17. #if UNITY_2020_1_OR_NEWER
  18. return VersionControlSettings.mode;
  19. #else
  20. return EditorSettings.externalVersionControl;
  21. #endif
  22. }
  23. static void SetVersionControl(string versionControl)
  24. {
  25. #if UNITY_2020_1_OR_NEWER
  26. VersionControlSettings.mode = versionControl;
  27. #else
  28. EditorSettings.externalVersionControl = versionControl;
  29. #endif
  30. }
  31. }
  32. }