11 [SerializeField]
int StartSlideIndex = 0;
15 [SerializeField] GameObject[]
Slides;
20 if(OpenSlideButtons == null)
21 Debug.LogError(
"(UISlidesController) OpenSlideButtons is null!");
22 if(ActiveSlideIcons == null)
23 Debug.LogError(
"(UISlidesController) ActiveSlideIcons is null!");
25 Debug.LogError(
"(UISlidesController) Slides is null!");
26 else if (OpenSlideButtons.Length != ActiveSlideIcons.Length || ActiveSlideIcons.Length != Slides.Length)
27 Debug.LogError(
"(UISlidesController) OpenSlideButtons, ActiveSlideIcons and Slides don't have the same size/length!");
29 OpenSlide(StartSlideIndex);
35 if(index < 0 || index >= Slides.Length)
36 Debug.LogError(
"A slide with the index >" + index.ToString() +
"< doesn't exists");
39 for(
int i = 0; i < Slides.Length; i++)
43 OpenSlideButtons[i].SetActive(
false);
44 ActiveSlideIcons[i].SetActive(
true);
45 Slides[i].SetActive(
true);
49 OpenSlideButtons[i].SetActive(
true);
50 ActiveSlideIcons[i].SetActive(
false);
51 Slides[i].SetActive(
false);
GameObject [] OpenSlideButtons
This MonoBehaviour is for showing one slide after another. One example would be a tabs window where s...
GameObject [] ActiveSlideIcons
void OpenSlide(int index)