Switch
Analog of the default Toggle, but changes mark position instead of changing checkmark visibility.
Options
IsOn
bool
Is on?
Group
SwitchGroup
Switch group. Only one
Switch
in the same group can be on.Direction
SwitchDirection
Mark animation direction:
LeftToRight
,RightToLeft
,BottomToTop
,TopToBottom
Mark
RectTransform
Animated mark.
MarkGraphic
Graphic
Mark graphic.
Background
Graphic
Background graphic.
MarkOnColor
Color
Color of the MarkGraphic when
Switch
is on.MarkOffColor
Color
Color of the MarkGraphic when
Switch
is off.BackgroundOnColor
Color
Color of the Background when
Switch
is on.BackgroundOffColor
Color
Color of the Background when
Switch
is on.AnimationDuration
float
Animation duration.
AnimationCurve
AnimationCurve
Animation curve.
UnscaledTime
bool
Animate using unscaled time.
Events
OnValuedChanged
UnityEvent<bool>
Event on value changed.