public class CloneButton : MonoBehaviour, IPointerDownHandler, IPointerUpHandler, IPointerClickHandler
{
[SerializeField] Button Btn_Ref;
public void OnPointerDown(PointerEventData eventData)
{
ExecuteEvents.Execute(Btn_Ref.gameObject, eventData, ExecuteEvents.pointerDownHandler);
}
public void OnPointerUp(PointerEventData eventData)
{
ExecuteEvents.Execute(Btn_Ref.gameObject, eventData, ExecuteEvents.pointerUpHandler);
}
public void OnPointerClick(PointerEventData eventData)
{
ExecuteEvents.Execute(Btn_Ref.gameObject, eventData, ExecuteEvents.submitHandler);
}
}
'🌍 Unity > UI & TMP' 카테고리의 다른 글
UI Extension : ScrollSnap / 스냅 스크롤 뷰 (3) | 2020.05.03 |
---|---|
UI Unmask (0) | 2020.04.07 |
HorizontalLayoutGroup / VerticalLayoutGroup update 레이아웃 업데이트 문제 (0) | 2020.04.03 |
유니티 TextMeshPro 한글 폰트 생성 설정 정리 (0) | 2020.03.30 |
Unity UI Button onClick.AddListener 활용하기 (0) | 2020.02.24 |