KeyboardKeydownBtn.cs 324 B

1234567891011121314
  1. using UnityEngine;
  2. using UnityEngine.Events;
  3. using UnityEngine.EventSystems;
  4. public class KeyboardKeydownBtn : MonoBehaviour, IPointerDownHandler
  5. {
  6. [HideInInspector]
  7. public UnityEvent onClick = new UnityEvent();
  8. public void OnPointerDown(PointerEventData eventData)
  9. {
  10. onClick?.Invoke();
  11. }
  12. }