using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine.UI; public class NewkuangchangItem : MonoBehaviour { // Start is called before the first frame update public MiningContract miningContract; public TextMeshProUGUI count; public Button BuyButton; void Start() { BuyButton.onClick.AddListener(BuyItem); } async void BuyItem() { buyMiningContract103 buyMiningContract = new buyMiningContract103(); bool isBuySucceed = await buyMiningContract.BuyMiningContract((long)miningContract.voluteCoinBuy); Debug.Log(isBuySucceed); } // Update is called once per frame void Update() { } }