> For the complete documentation index, see [llms.txt](https://ferdowsur.gitbook.io/modular-3d-text/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ferdowsur.gitbook.io/modular-3d-text/ui/toggle/script-documentation.md).

# Script documentation

Toggle.cs in TinyGiantStudio.Text namespace

*If anything except method names starts with a capital letter, it's a property.*

### *<mark style="color:orange;">Variables</mark>*

<table data-full-width="true"><thead><tr><th width="176">Variable</th><th width="175">Type</th><th>Description</th></tr></thead><tbody><tr><td><strong>IsOn</strong></td><td>bool</td><td></td></tr><tr><td><strong>onGraphic</strong></td><td>GameObject</td><td></td></tr><tr><td><strong>offGraphic</strong></td><td>GameObject</td><td></td></tr><tr><td><strong>onEvent</strong></td><td>UnityEvent</td><td></td></tr><tr><td><strong>offEvent</strong></td><td>UnityEvent</td><td></td></tr></tbody></table>

### *<mark style="color:orange;">Methods</mark>*

<table data-full-width="true"><thead><tr><th width="242.00000000000006"></th><th></th></tr></thead><tbody><tr><td><strong>Set</strong> (<em>bool</em> <strong>set</strong>)</td><td><em>Sets the isOn state of the toggle according to the bool passed.</em></td></tr><tr><td><strong>ToggleState</strong> ()</td><td><em>Switches between on and off.</em></td></tr><tr><td><strong>CallToggleEvent</strong> ()</td><td><em>Just calls the event depending on the current state of the Toggle(on/off).</em></td></tr><tr><td><strong>VisualUpdate</strong> ()</td><td><em>Just updates the visual depending on the current state of the Toggle(on/off).</em></td></tr><tr><td><strong>ActiveVisualUpdate</strong> ()</td><td><em>Changes the graphic to activated.</em></td></tr><tr><td><strong>InactiveVisualUpdate</strong> ()</td><td><em>Changes the graphic to inactivate.</em></td></tr></tbody></table>

## *<mark style="color:yellow;">Version History</mark>*

### *<mark style="color:orange;">v4.0.0</mark> (May 4, 2023)*

*Method **`Toggle`** renamed to `ToggleState`*
