Class GlobalColourPicker
- Namespace
- PAC.ColourPicker
A class for the main colour picker in the program - the one that appears in the main view.
public class GlobalColourPicker : MonoBehaviour
- Inheritance
-
GlobalColourPicker
Properties
colour
The currenty-selected colour.
public Color colour { get; }
Property Value
- Color
numOfColourPreviews
public int numOfColourPreviews { get; }
Property Value
primaryColour
The current primary colour.
public Color primaryColour { get; }
Property Value
- Color
secondaryColour
The current secondary colour.
public Color secondaryColour { get; }
Property Value
- Color
Methods
GetColour(int)
Gets the chosen colour at the given index: 0 - primary; 1 - secondary.
public Color GetColour(int colourPreviewIndex)
Parameters
colourPreviewIndex
int
Returns
- Color
SetColour(Color)
Sets the current colour.
public void SetColour(Color colour)
Parameters
colour
Color
SubscribeToOnColourChange(UnityAction)
Event is invoked when the selected colour changes.
public void SubscribeToOnColourChange(UnityAction call)
Parameters
call
UnityAction