using System.Collections; using System.Collections.Generic; using UnityEngine; using TMPro; public class APIWindows : MonoBehaviour { [SerializeField] List text = new List(); // Start is called before the first frame update //void Start() //{ // //init("创建机器人,方法:CREATE,参数:无参,重载:2重载,返回值:无返回值,类:SZPT"); //} public void init(string item) { if (!string.IsNullOrEmpty(item)) { var temp1 = item.Split(','); foreach (var item2 in temp1) { Debug.Log(item2); } for (int i = 0; i < text.Count; i++) { var temp2 = temp1[i].Split(":"); if (temp2.Length >= 2) { text[i].text = "" + temp2[0] + ":" + temp2[1]; } else { text[i].text = temp2[0]; } } } } public void show() { } }