Version 2.1.0.0

ColorPaletteManager class

Namespace: Sirenix.OdinInspector.Editor
Assembly: Sirenix.OdinInspector.Editor
[SirenixEditorConfig]
public class ColorPaletteManager : GlobalConfig<ColorPaletteManager>

Add, Edit or remove custom color palettes used by the ColorPaletteAttribute.

You can modify the configuration in the Odin Preferences window found in 'Tools -> Odin Inspector -> Preferences -> Drawers -> Color Palettes', or by locating the configuration file stored as a serialized object in the Sirenix folder under 'Odin Inspector/Config/Editor/ColorPaletteManager'.

Inheritance

Constructors

ColorPaletteManager()
public ColorPaletteManager()

Properties

ColorPalettes
Gives you the list of all custom color palettes. Remember to call UnityEditor.EditorUtility.SetDirty(ColorPaletteManager.Instance) after modifying the list.
public List<ColorPalette> ColorPalettes { get; }
ShowPaletteName
If true, a toolbar with the name of the color palette is shown above each color palette.
[ShowInInspector]
[PropertyOrder(11)]
[HorizontalGroup("Settings/Split", 0F, 0, 0, 0, LabelWidth = 130F)]
[VerticalGroup("Settings/Split/Left", 0)]
[PropertyTooltip("If true, a toolbar with the name of the color palette is shown above each color palette.")]
public bool ShowPaletteName { get; }
StretchPalette
If true, all color in a color palette is stretch so that the entire color-palette area is filled.
[ShowInInspector]
[PropertyOrder(10)]
[VerticalGroup("Settings/Split/Left", 0)]
[PropertyTooltip("If true, all color in a color palette is stretch so that the entire color-palette area is filled.")]
public bool StretchPalette { get; }
SwatchSize
Specify the width of each color in a color palette. If StretchPalette is set to true, this will become the min-width.
[ShowInInspector]
[VerticalGroup("Settings/Split/Right", 0)]
[PropertyTooltip("Specify the width of each color in a color palette. If StretchPalette is set to true, this will become the min-width.")]
[MinValue(1)]
[PropertyOrder(13)]
public int SwatchSize { get; }
SwatchSpacing
Specify the amount of spacing between each color in a color palette.
[PropertyOrder(12)]
[BoxGroup("Settings", true, false, 0)]
[HorizontalGroup("Settings/Split", 0.5F, 0, 0, 0, LabelWidth = 130F)]
[VerticalGroup("Settings/Split/Right", 0)]
[ShowInInspector]
[PropertyTooltip("Specify the amount of spacing between each color in a color palette.")]
[PropertyRange(0, 7)]
public int SwatchSpacing { get; }