SavemapButtonTest.cs 523 B

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