Adding more Toggles and a Toggle Group to implement mutually-exclusive radio buttons

Unity UI Toggles are also the base components if we wish to implement a group of mutually-exclusive options in the style of radio buttons. We need to group related radio button UI Toggles together, so when one turns on, all the others in the group turn off.

We also need to change the visual look if we want to adhere to the usual style of radio buttons as circles, rather than the square UI Toggle default images:

To create a group of related toggles in the visual style of radio buttons, do the following to the project you just created:

  1. Import the UI Demo Textures ...

Get Unity 2018 Cookbook - Third Edition 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.