You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
|
using UnityEditor;
|
|
|
|
|
|
|
|
|
|
namespace Unity.PlasticSCM.Editor.UI
|
|
|
|
|
{
|
|
|
|
|
internal static class BoolSetting
|
|
|
|
|
{
|
|
|
|
|
internal static bool Load(
|
|
|
|
|
string boolSettingName,
|
|
|
|
|
bool defaultValue)
|
|
|
|
|
{
|
|
|
|
|
return EditorPrefs.GetBool(
|
|
|
|
|
GetSettingKey(boolSettingName),
|
|
|
|
|
defaultValue);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static void Save(
|
|
|
|
|
bool value,
|
|
|
|
|
string boolSettingName)
|
|
|
|
|
{
|
|
|
|
|
EditorPrefs.SetBool(
|
|
|
|
|
GetSettingKey(boolSettingName), value);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
internal static void Clear(
|
|
|
|
|
string boolSettingName)
|
|
|
|
|
{
|
|
|
|
|
EditorPrefs.DeleteKey(
|
|
|
|
|
GetSettingKey(boolSettingName));
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
static string GetSettingKey(string boolSettingName)
|
|
|
|
|
{
|
|
|
|
|
return string.Format(
|
|
|
|
|
boolSettingName, PlayerSettings.productGUID);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|