1using System.Collections.Generic;
7 public static class ColorPresetManager
9 private static readonly Dictionary<string, ColorPresetList>
10 _presets =
new Dictionary<string, ColorPresetList>();
12 public static ColorPresetList Get(
string listId =
"default")
14 ColorPresetList preset;
15 if (!_presets.TryGetValue(listId, out preset))
17 preset =
new ColorPresetList(listId);
18 _presets.Add(listId, preset);
34 if (colors ==
null) colors =
new List<Color>();
ColorPresetList(string listId, List< Color > colors=null)
void AddColor(Color color)
UnityAction< List< Color > > OnColorsUpdated
void UpdateList(IEnumerable< Color > colors)