using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using System.Linq; using UnityEngine.EventSystems; using TMPro; public class MainStore_Menu : MonoBehaviour{ public TextMeshProUGUI MenuSelection_text; public GameObject FirstShopMenuSelectedObject; public GameObject[] MainStoreMenu_ToggleGameObjects; public GameObject[] Originals_GameObjects; // Array to hold the list of GameObjects public GameObject[] Coins_GameObjects; // Array to hold the list of GameObjects public GameObject[] BattlePass_GameObjects; // Array to hold the list of GameObjects private GameObject[] combinedArray; private Button[] MainStoreMenu_buttons; private string currentActiveMenuItem; private Color whiteColor = new Color(1f, 1f, 1f); // Color for the currently selected GameObject private Color blue_selectedColor = new Color(0.4313726f, 0.6235294f, 0.9607843f); private Color normalColor = new Color(0.04705882f, 0.07058824f, 0.1215686f); void OnEnable(){ // Initialize the array to store Button components MainStoreMenu_buttons = new Button[MainStoreMenu_ToggleGameObjects.Length]; // Iterate over each GameObject in the array for (int i = 0; i < MainStoreMenu_ToggleGameObjects.Length; i++){ // Get the Button component from the current GameObject Button button = MainStoreMenu_ToggleGameObjects[i].GetComponent