์ด์ฐ ์ ๋ง ์์ํ๋ค
๋ฐ์๊ฑฐ ๊ณ ๋๋ก ๋ณต์ฌํด์ ์คํฌ๋ฆฝํธ ๋ง๋ค๊ณ
๊ธฐ์กด์ ๋ค์ด์๋ ๋ฒํผ ์ปดํฌ๋ํธ ๋นผ๋ฒ๋ฆฌ๊ณ
๋์ ๋ฃ์ด๋๋ฉด ๊ธฐ๊น๋๊ฒ ์๋ํจ ๊ตณ๊ตณ
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.EventSystems;
using UnityEngine.UI;
public class CustomButton : Button
{
private void Press()
{
if (!IsActive() || !IsInteractable())
return;
UISystemProfilerApi.AddMarker("Button.onClick", this);
onClick.Invoke();
}
public override void OnPointerClick(PointerEventData eventData)ย
{
//if (eventData.button != PointerEventData.InputButton.Left) {}
Press();
}
}
๋๊ธ 0