Theme
Terminology
Variation is color scheme, it includes not only colors but sprites, textures, and fonts.
Variation names should be unique per Theme
.
Options are lists of values from different variations with the same purpose.
Option names should be unique per the type of value of the Theme
.
Attach Theme Exceptions
When you use Attach Theme some values are ignored and will have option None
:
Image
: null spriteImage
: white color on non-white sprite or sprites withui-themes-white-sprite
label (case insensitive)Image
: sprite withui-themes-exclude
labelSelectable
: default colorsText
: null fontRawImage
: null texture
But you can manually select option for properties with such values.
Properties
IReadOnlyList<Variation> Variations
Variations list.
VariationId ActiveVariationId
ID of the active variation.
Methods
bool SetActiveVariation(string name)
Set active variation by name. Return
false
if variation with specified name was not found.Variation GetVariation(string name)
Get variation by name.
Variation GetVariation(VariationId id)
Get variation by ID.
Events
Action<VariationId> OnChange
Event fired when active variation or its values were changed.