using UnityEngine; using UnityEngine.UI; [RequireComponent(typeof(Toggle))] public class DropDownutils : MonoBehaviour { Toggle toggle; // Start is called before the first frame update void Start() { toggle = this.GetComponent(); } // Update is called once per frame void Update() { if (toggle == null) return; this.transform.Find("Item Label").GetComponent().color = toggle.isOn ? new Color32(0, 0, 0, 255) : new Color32(182, 152, 104, 255); } }