using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class ToggleImageSelect : MonoBehaviour { public Toggle toggle; public GameObject ChecketImage; public Image backgroudImage; private void Start() { toggle = this.GetComponent(); toggle.onValueChanged.AddListener((b) => { ChecketImage.SetActive(b); backgroudImage.enabled = !b; }); } }