TestMyButton.cs 547 B

123456789101112131415
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. public class TestMyButton : MonoBehaviour
  5. {
  6. public MyButton myButton;
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. myButton.onClick.AddListener(()=> {Debug.Log(" myButton.onClick");});
  11. myButton.OnDoubleClick.AddListener(() => {Debug.Log(" myButton.OnDoubleClick");});
  12. myButton.OnLongPress.AddListener(() => {Debug.Log(" myButton.OnLongPress");});}
  13. // Update is called once per frame
  14. void Update(){}
  15. }