rabidus-test/Assets/CurvedUI/Demo Scenes/Demo Scenes Content/CUI_PickImageFromSet.cs

30 lines
577 B
C#
Raw Permalink Normal View History

2023-08-15 17:38:54 +03:00
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
namespace CurvedUI
{
public class CUI_PickImageFromSet : MonoBehaviour
{
static CUI_PickImageFromSet picked = null;
public void PickThis()
{
if (picked != null)
picked.GetComponent<Button>().targetGraphic.color = Color.white;
Debug.Log("Clicked this!", this.gameObject);
picked = this;
picked.GetComponent<Button>().targetGraphic.color = Color.red;
}
}
}