12345678910111213141516171819202122 |
- 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>();
- toggle.onValueChanged.AddListener((b) =>
- {
- ChecketImage.SetActive(b);
- backgroudImage.enabled = !b;
- });
- }
- }
|