Toggle Switch
Learn about UI objects with this video tutorial
Add a toggle switch to a game
Get a toggle switch from asset store
The Settings UI asset pack from the asset store contains free and read-to-use toggle switches.
Tip
This pack also contains sliders.
Create a toggle switch from scratch
Toggle switches need one image for each state: checked or unchecked.
Tip
The states transition can be animated. It works the same way as Sprites.
Get toggle switch states
Toggle switch states can be checked with the "Is checked" condition.
Sliders and toggle switches can be useful to make a settings panel. As the settings panel and the game may be in different scene, the value can be stored in a global variable to be able use it in the game scene.