Implements: BaseComponentView, IColorPickerComponentView, IComponentModelConfig
Model: ColorPickerModel
A panel that provides sliders and color presets to change any color, providing an event passing the new color.
List<Color>
: List containing the colors that will be added to the preset list.incrementAmount
: float indicating how much the sliders will increment or decrement when the right and left arrows are pressed.
void Configure(BaseComponentModel newModel)
: Fills the model and refreshes the color picker component with this data.Action<Color> OnColorChanged
: Event that will be triggered when the color changes.void SetColorList(List<Color> colorList)
: Set the color presets.void SetIncrementAmount(float amount)
: Set the slider increment/decrement amount per click.
- Drag the prefab to your scene.
- Configure the model from the inspector.
- Click on [REFRESH].
- From the scripts that wants to get the new color, subscribe to the
OnColorChanged
event and read the passedColor