public void MyClick() { MyManager.currentChampIcon = this.GetComponent <Image>().sprite; // set as new icon target myManager.ChampIconSwap(); // set image to icon target myManager.championPanelsArray[myManager.championPanelCtr].gameObject.SetActive(false); // turn off panel myManager.championPanelCtr = 0; // select panel 0 }