public void Toggle() { if (isInGroup) { if (parent == null) { parent = transform.parent.GetComponent <CUIToggleGroup>(); } if (parent == null) { parent = transform.parent.parent.GetComponent <CUIToggleGroup>(); } parent.OnChildToggled(this, true, false, true); } else { if (isSelected) { Deselect(); } else { Select(); } } }
private void Awake() { button = GetComponent <Button>(); if (isInGroup) { parent = transform.GetComponentInParent <CUIToggleGroup>(); } }
private void Reset() { CUIToggleGroup group = transform.parent.GetComponent <CUIToggleGroup>(); if (group != null) { group.FindChildrenToggles(); } }
public void SetParentToggleGroup(CUIToggleGroup group) { parent = group; }