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