Toggle component

The parent Toggle object has a Toggle component. The Toggle component looks very similar to the Button component and has many of the same properties.  As you'll see in this chapter, the first few properties of all interactable UI objects are the same. The properties at the bottom of the component are the ones that are exclusive to the UI Toggle object:

The Is On property determines whether the Toggle is checked or not when it is initialized in the scene.

The Toggle Transition property determines what happens when the toggle transitions between on and off or checked and not checked. The two options are None and Fade. The

Get Mastering UI Development with Unity now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.