Skip to main content

Introduction

The Checkbox component is a Selectable that controls a graphic which displays the on/off state and a Label of localizable text.

"Checkbox"

Fields#

NameDescription
Toggle TransitionTransition mode for the toggle.
GraphicGraphic affected by the toggle.
Use Toggle GroupAdd Checkbox to a Toggle Group
Group NameName of the Toggle Group to use
Enabled Text ColorColor of text when interactable.
Disabled Text ColorColor of text when not interactable.
LocalizeAutomatically localize text.
On Text ChangedEvent raised when text changes.
On Value ChangedEvent raised when on/off state changes.
On CheckedEvent raised when state becomes on.
On UncheckedEvent raised when state becomes off.
TargetComponent used to display text.

Properties#

NameDescription
isOnGets/Sets the on/off state.
textGets/Sets text. On set text is localized if the localize flag is set
textMeshProReturns the TextMeshPro object displaying text
unlocalizedTextReturns the text supplied before localization