Created
April 3, 2015 22:45
-
-
Save unitycoder/19304cfd53d412d00b19 to your computer and use it in GitHub Desktop.
Get Active Toggle From ToggleGroup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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