OnSelectTriggerButtonUse.cs 447 B

12345678910111213141516171819
  1. using UnityEngine;
  2. using System.Collections;
  3. using UnityEngine.UI;
  4. using UnityEngine.EventSystems;
  5. using System;
  6. namespace Devdog.SciFiDesign.UI
  7. {
  8. [RequireComponent(typeof(Button))]
  9. public class OnSelectTriggerButtonUse : MonoBehaviour, ISelectHandler
  10. {
  11. public void OnSelect(BaseEventData eventData)
  12. {
  13. GetComponent<Button>().OnPointerClick(new PointerEventData(EventSystem.current));
  14. }
  15. }
  16. }