Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created April 3, 2015 22:45
Show Gist options
  • Save unitycoder/19304cfd53d412d00b19 to your computer and use it in GitHub Desktop.
Save unitycoder/19304cfd53d412d00b19 to your computer and use it in GitHub Desktop.
Get Active Toggle From ToggleGroup
void GetActiveToggle(ToggleGroup group)
{
// get first active toggle (and actually there should be only one in a group)
foreach (var item in group.ActiveToggles())
{
Debug.Log(item.name);
break;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment