using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; public class KuangChangPop : MonoBehaviour { queryMiningContractList101 queryMiningContractList = new queryMiningContractList101();//10.110.1,查询可购买的挖矿合约 MiningContractList miningContractList = new MiningContractList(); public GameObject ItemParent; public GameObject kuanghcangItem; // Start is called before the first frame update async void Start() { miningContractList = await queryMiningContractList.QueryMiningContract(); Debug.Log(miningContractList.data.Count); for (int i = miningContractList.data.Count -1; i >= 0; i--) { var miningContract = miningContractList.data[i]; GameObject item = Instantiate(kuanghcangItem); item.transform.parent = ItemParent.transform; NewkuangchangItem newiItem = item.GetComponent(); newiItem.count.text = miningContract.voluteCoinBuy.ToString(); newiItem.miningContract = miningContractList.data[i]; } } // Update is called once per frame void Update() { } }