Skip to content

Instantly share code, notes, and snippets.

@unitycoder
Created April 3, 2015 22:45
Show Gist options
  • Select an option

  • Save unitycoder/19304cfd53d412d00b19 to your computer and use it in GitHub Desktop.

Select an option

Save unitycoder/19304cfd53d412d00b19 to your computer and use it in GitHub Desktop.

Revisions

  1. unitycoder created this gist Apr 3, 2015.
    9 changes: 9 additions & 0 deletions gistfile1.cs
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    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;
    }
    }