using System.Collections; using System.Collections.Generic; using TMPro; using UnityEngine; using UnityEngine.UI; public class TgCheck : MonoBehaviour { public int index; public TextMeshProUGUI tm; public Image img_tm; public Image img_select; public Image img_normal; private void Awake() { //tm = transform.Find("tm_value").GetComponent(); //img_select = transform.Find("img_select").GetComponent(); //img_normal = transform.Find("img_normal").GetComponent(); gameObject.AddComponent(); } public void Select() { img_select.gameObject.SetActive(true); img_normal.gameObject.SetActive(false); if (tm != null) tm.color = new Color32(255, 255, 228, 255); if (img_tm != null) img_tm.color = new Color32(255, 255, 228, 255); } public void UnSelect() { img_select.gameObject.SetActive(false); img_normal.gameObject.SetActive(true); //tm.color = new Color32(139, 178, 156, 255); if (tm != null) tm.color = new Color32(139, 178, 156, 255); if (img_tm != null) img_tm.color = new Color32(139, 178, 156, 255); } }