/// <summary> /// Adds the given button to the group. /// </summary> /// <param name="button">The button to add</param> public ButtonGroup AddButton(IButtonGroupElement button) { button.rectTransform.parent = ButtonLayoutGroup.transform; _buttons.Add(button); return(this); }
/// <summary> /// Removes the given button from the group. /// </summary> /// <param name="button">The button to remove</param> public ButtonGroup RemoveButton(IButtonGroupElement button) { _buttons.Remove(button); GameObject.DestroyImmediate(button.gameObject); return(this); }