ResavemapButtonTest.cs 542 B

1234567891011121314151617181920212223
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class ResavemapButtonTest : MonoBehaviour
  6. {
  7. // Start is called before the first frame update
  8. void Start()
  9. {
  10. this.GetComponent<Button>().onClick.AddListener(OnResavemapBtnClick);
  11. }
  12. private void OnDestroy()
  13. {
  14. this.GetComponent<Button>().onClick.RemoveListener(OnResavemapBtnClick);
  15. }
  16. private void OnResavemapBtnClick()
  17. {
  18. API_GSXR_Slam.GSXR_ResaveMap("forTest");
  19. }
  20. }