World Utilities / UI

Toggle

Binds a Unity UI Toggle (checkbox) to a boolean value.

since v0.1.0localsynchronizedpersisted
Component Add Component menu / prefab Source
Value ToggleVRCTools.World.Values.UI.ValueToggle Values › UI › Value Toggleprefab: Toggle.prefab ValueToggle.cs ↗

Keeps a Toggle in sync with a boolean value. Ticking the toggle writes the value; changing the value from anywhere else updates the checkmark.

Parameters

Parameter Default Description
Type LOCAL Kind of the bound value.
Source/Target None The boolean value. Required.
Invert false Advanced. Show the toggle as checked while the value is false (and vice versa).

Requires a Toggle on the same game object whose On Value Changed calls _OnValueChanged (see UI).

Invert is handy for “Disable post processing” style options backed by a value that means enabled.