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.

BoolSetting.cs 914B

12345678910111213141516171819202122232425262728293031323334353637
  1. using UnityEditor;
  2. namespace Unity.PlasticSCM.Editor.UI
  3. {
  4. internal static class BoolSetting
  5. {
  6. internal static bool Load(
  7. string boolSettingName,
  8. bool defaultValue)
  9. {
  10. return EditorPrefs.GetBool(
  11. GetSettingKey(boolSettingName),
  12. defaultValue);
  13. }
  14. internal static void Save(
  15. bool value,
  16. string boolSettingName)
  17. {
  18. EditorPrefs.SetBool(
  19. GetSettingKey(boolSettingName), value);
  20. }
  21. internal static void Clear(
  22. string boolSettingName)
  23. {
  24. EditorPrefs.DeleteKey(
  25. GetSettingKey(boolSettingName));
  26. }
  27. static string GetSettingKey(string boolSettingName)
  28. {
  29. return string.Format(
  30. boolSettingName, PlayerSettings.productGUID);
  31. }
  32. }
  33. }