diff --git a/Assets/Script/Utilty/SingleInteractableButtonHandler.cs b/Assets/Script/Utilty/SingleInteractableButtonHandler.cs new file mode 100644 index 0000000..fe272c8 --- /dev/null +++ b/Assets/Script/Utilty/SingleInteractableButtonHandler.cs @@ -0,0 +1,52 @@ +using UnityEngine; +using UnityEngine.UI; + +public class SingleInteractableButtonHandler : MonoBehaviour +{ + [Tooltip("이 버튼이 한 번만 클릭되도록 제한할지 여부")] + [SerializeField] private bool enableOneTimeClick = true; + + private Button _button; + + private bool hasBeenClicked = false; + + private void Awake() + { + // 버튼 컴포넌트 가져오기 + _button = GetComponent