Version 3.3.1.2

ColorPaletteManager class

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

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(11F)]
[HorizontalGroup("Settings/Split", 0F, 0, 0, 0F, LabelWidth = 130F)]
[VerticalGroup("Settings/Split/Left", 0F)]
[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(10F)]
[VerticalGroup("Settings/Split/Left", 0F)]
[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", 0F)]
[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(13F)]
public int SwatchSize { get; }
SwatchSpacing
Specify the amount of spacing between each color in a color palette.
[PropertyOrder(12F)]
[BoxGroup("Settings", true, false, 0F)]
[HorizontalGroup("Settings/Split", 0.5F, 0, 0, 0F, LabelWidth = 130F)]
[VerticalGroup("Settings/Split/Right", 0F)]
[ShowInInspector]
[PropertyTooltip("Specify the amount of spacing between each color in a color palette.")]
[PropertyRange(0, 7)]
public int SwatchSpacing { get; }