Files
GameDevTVObstacleDodge/Library/PackageCache/com.unity.collab-proxy@1ec4e416a4af/Editor/IntSetting.cs

28 lines
726 B
C#
Raw Normal View History

2026-01-08 16:50:20 +00:00
using UnityEditor;
namespace Unity.PlasticSCM.Editor
{
internal static class IntSetting
{
internal static int Load(string settingName, int defaultValue)
{
return EditorPrefs.GetInt(GetSettingKey(settingName), defaultValue);
}
internal static void Save(int value, string settingName)
{
EditorPrefs.SetInt(GetSettingKey(settingName), value);
}
internal static void Clear(string settingName)
{
EditorPrefs.DeleteKey(GetSettingKey(settingName));
}
static string GetSettingKey(string settingName)
{
return string.Format(settingName, PlayerSettings.productGUID);
}
}
}