CUI_PickImageFromSet.cs 607 B

1234567891011121314151617181920212223242526272829
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. namespace CurvedUI
  6. {
  7. public class CUI_PickImageFromSet : MonoBehaviour
  8. {
  9. static CUI_PickImageFromSet picked = null;
  10. public void PickThis()
  11. {
  12. if (picked != null)
  13. picked.GetComponent<UnityEngine.UI.Button>().targetGraphic.color = Color.white;
  14. Debug.Log("Clicked this!", this.gameObject);
  15. picked = this;
  16. picked.GetComponent<UnityEngine.UI.Button>().targetGraphic.color = Color.red;
  17. }
  18. }
  19. }