public void Previous() { if (currentWindowIndex > 0) { currentWindowIndex--; if (currentWindow != null) { currentWindow.Close(); } currentWindow = MenuWindows[currentWindowIndex]; if (currentWindow != null) { currentWindow.gameObject.SetActive(true); currentWindow.Open(); } } }
public void Next() { if (currentWindowIndex < MenuWindows.Count - 1) { currentWindowIndex++; if (currentWindow != null) { currentWindow.Close(); } currentWindow = MenuWindows[currentWindowIndex]; if (currentWindow != null) { currentWindow.gameObject.SetActive(true); currentWindow.Open(); } } }