using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; using TMPro; public class ToolsReceive_UICount : MonoBehaviour { public GameObject toolgo; public Button button; public TMP_Text °´Å¥Ãû; // Start is called before the first frame update void Start() { button.onClick.AddListener(onclick); } // Update is called once per frame void Update() { } public void onclick() { Destroy(toolgo); Destroy(gameObject); } }