赞
踩
此教程需用到UniExcel插件,unity商店中有,如果需要留邮箱
大家都知道,对数据进行处理无非就是增删改查那一套,方法我会在代码中列出,如有需要自行调用;
using DG.Tweening; using Excel; using NPOI.HSSF.UserModel; using System.Collections; using System.Collections.Generic; using System.Data; using System.IO; using UnityEngine; using UnityEngine.UI; using UnityEngine.EventSystems; public class GoodsListPanel : MonoBehaviour { private string MySheetName = "Sheet1"; public List<string> Mystring; public GameObject tipMessage; public GameObject tableItemPrefab; public GameObject Content; public List<TableItem> tableItemList = new List<TableItem>(); public Scrollbar scrollbar; private FileStream MyAddress; public static GoodsListPanel Instance; private bool isChange = false; private Vector3 tipMessageroot; private void Awake() { Instance = this; tipMessageroot = tipMessage.transform.localPosition; transform.Find("DeleteButton").GetComponent<Button>().onClick.AddListener(() => { isChange = !isChange; for (int i = 0; i < tableItemList .Count ; i++) { if (i%5==0&&isChange ==true ) { tableItemList[i].DelButton.gameObject.SetActive(true); transform.Find("DeleteButton").GetComponent<Button>().transform.GetChild(0).GetComponent<Text>().text = "完成"; } if (i % 5 == 0 && isChange == fa
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。