DestroySafetyAreaButtonTest.cs 511 B

12345678910111213141516171819202122
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using UnityEngine.UI;
  5. public class DestroySafetyAreaButtonTest : MonoBehaviour
  6. {
  7. void Start()
  8. {
  9. this.GetComponent<Button>().onClick.AddListener(OnSavemapBtnClick);
  10. }
  11. private void OnDestroy()
  12. {
  13. this.GetComponent<Button>().onClick.RemoveListener(OnSavemapBtnClick);
  14. }
  15. private void OnSavemapBtnClick()
  16. {
  17. API_Module_SafetyArea.DestroySafetyArea();//.GSXR_SaveMap();
  18. }
  19. }