using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ClassItem : MonoBehaviour { public Text classname; public Button NoSelectedBtn; public Button SelectedBtn; public Text SelectedBtntext; public GameObject JuesechoicePop; // Start is called before the first frame update void Start() { NoSelectedBtn.onClick.AddListener(OpenJueseChoicePop); SelectedBtn.onClick.AddListener(OpenJueseChoicePop); setClassItem(); } public void setClassItem() { if(true) { SelectedBtn.gameObject.SetActive(true); SelectedBtntext.text = "½ÇÉ«Ãû"; NoSelectedBtn.gameObject.SetActive(false); } else { NoSelectedBtn.gameObject.SetActive(true); SelectedBtn.gameObject.SetActive(false); } } void OpenJueseChoicePop() { JuesechoicePop.SetActive(true); } // Update is called once per frame void Update() { } }