How do I use the new Unity UI "ToggleGroup"?

I have been messing around with “ToggleGroup” and I don’t really understand it that much. I made two toggles and and empty game object with the “ToggleGroup” script and grouped the two toggles together. But when I go into the game, neither of the toggles even work. Do I have to script something in to make the toggles work? If so, how do I begin? I have been looking through the documents and they don’t really say how to make them work, they just say how to group them together.

Have you dragged the object with the ToggleGroup Component onto the Group slot for each Toggle?

I script this with instantiated Prefabs that have child toggles on them and assign them the toggle group in a script but in theory you should be able to just drag a gameObect with a toggle group component onto that empty slot an it’ll just work.

Happy to share my code if you want that.