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.

50 lines
1.3 KiB
C#

using UnityEditor.SettingsManagement;
namespace UnityEditor.Polybrush
{
static class PolybrushSettings
{
internal const string k_PackageName = "com.unity.polybrush";
static Settings s_Instance;
internal static Settings instance
{
get
{
if (s_Instance == null)
{
s_Instance = new Settings(k_PackageName);
}
return s_Instance;
}
}
public static void Save()
{
instance.Save();
}
public static void Set<T>(string key, T value, SettingsScope scope = SettingsScope.Project)
{
instance.Set<T>(key, value, scope);
}
public static T Get<T>(string key, SettingsScope scope = SettingsScope.Project, T fallback = default(T))
{
return instance.Get<T>(key, scope, fallback);
}
public static bool ContainsKey<T>(string key, SettingsScope scope = SettingsScope.Project)
{
return instance.ContainsKey<T>(key, scope);
}
public static void Delete<T>(string key, SettingsScope scope = SettingsScope.Project)
{
instance.DeleteKey<T>(key, scope);
}
}
}