public void GoNext(TabSwitcherChild child) { int i = 0; foreach (TabSwitcherChild tc in Children) { try { if (child.gameObject.name == tc.gameObject.name) { UICamera.selectedObject = Children[i + 1].gameObject; return; } i++; } catch { UICamera.selectedObject = Children[0].gameObject; return; } } }
public void Add(TabSwitcherChild child) { Children.Add(child); }