์–ด์šฐ ์ •๋ง ์‹œ์›ํ•˜๋„ค

๋ฐ‘์—๊ฑฐ ๊ณ ๋Œ€๋กœ ๋ณต์‚ฌํ•ด์„œ ์Šคํฌ๋ฆฝํŠธ ๋งŒ๋“ค๊ณ 

๊ธฐ์กด์— ๋“ค์–ด์žˆ๋˜ ๋ฒ„ํŠผ ์ปดํฌ๋„ŒํŠธ ๋นผ๋ฒ„๋ฆฌ๊ณ 

๋Œ€์‹  ๋„ฃ์–ด๋‘๋ฉด ๊ธฐ๊น”๋‚˜๊ฒŒ ์ž‘๋™ํ•จ ๊ตณ๊ตณ



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();

}

}