A game about forced loneliness, made by TACStudios
1# Toggle 2 3The **Toggle** control is a checkbox that allows the user to switch an option on or off. 4 5![A Toggle.](images/UI_ToggleExample.png) 6![](images/UI_ToggleInspector.png) 7## Properties 8 9|**Property:** |**Function:** | 10|:---|:---| 11|**Interactable** | Will this component will accept input? See [Interactable](script-Selectable.md). | 12|**Transition** | Properties that determine the way the control responds visually to user actions. See [Transition Options](script-SelectableTransition.md). | 13|**Navigation** | Properties that determine the sequence of controls. See [Navigation Options](script-SelectableNavigation.md).| 14|**Is On** | Is the toggle switched on from the beginning? | 15|**Toggle Transition** | The way the toggle reacts graphically when its value is changed. The options are _None_ (ie, the checkmark simply appears or disappears) and _Fade_ (ie, the checkmark fades in or out). | 16|**Graphic** |The image used for the checkmark. | 17|**Group** | The [Toggle Group](script-ToggleGroup.md) (if any) that this Toggle belongs to. | 18 19 20## Events 21 22|**Property:** |**Function:** | 23|:---|:---| 24|**On Value Changed** | A [UnityEvent](https://docs.unity3d.com/Manual/UnityEvents.html) that is invoked when the Toggle is clicked. The event can send the current state as a `bool` type dynamic argument. | 25 26 27## Details 28 29The Toggle control allows the user to switch an option on or off. You can also combine several toggles into a [Toggle Group](script-ToggleGroup.md) in cases where only one of a set of options should be on at once. 30 31The Toggle has a single event called _On Value Changed_ that responds when the user changes the current value. The new value is passed to the event function as a `boolean` parameter. Typical use cases for Toggles include: 32 33* Switching an option on or off (eg, playing music during a game). 34* Letting the user confirm they have read a legal disclaimer. 35* Choosing one of a set of options (eg, a day of the week) when used in a Toggle Group. 36 37Note that the **Toggle** is a parent that provides a clickable area to children. If the **Toggle** has no children (or they are disabled) then it is not clickable.