/// <summary> /// Switch from one example to another /// </summary> /// <param name="newExample"></param> public void SwitchExample(string newExample) { examples.ForEach(e => e.gameObject.SetActive(false)); PagedRect example = null; switch (newExample) { case "HorizontalPaginationExample": example = HorizontalPaginationExample; break; case "VerticalPaginationExample": example = VerticalPaginationExample; break; case "DynamicPagesExample": example = DynamicPagesExample; break; case "SliderExample": example = SliderExample; break; case "CharacterCreationExample": example = CharacterCreationExample; break; case "SliderScrollRectExample": example = SliderScrollRectExample; break; case "PagePreviewsHorizontalExample": example = PagePreviewsHorizontalExample; break; case "PagePreviewsVerticalExample": example = PagePreviewsVerticalExample; break; case "NestedScrollRectExample": example = NestedScrollRectExample; break; case "TabsHorizontalScrollRectExample": example = TabsHorizontalScrollRectExample; break; } example.gameObject.SetActive(true); example.SetCurrentPage(1, true); }