using System.Collections; using System.Collections.Generic; using UnityEngine; using Sirenix.OdinInspector; using UnityEngine.UI; using System; using UnityCommon; namespace DTYJ { public class UIToolPanel : MonoBehaviour { public static UIToolPanel instance; public DicStringSprite dicPic; private GameObject goItem; private Transform tfImage; private void Awake() { instance = this; goItem = transform.GetChild(0).GetChild(1).gameObject; goItem.SetActive(false); tfImage = transform.GetChild(1); Init(); } private void Init() { foreach (var item in dicPic) { var goNew = Instantiate(goItem, goItem.transform.parent); goNew.SetActive(true); var itemName = item.Key; goNew.GetComponent().sprite = item.Value; goNew.GetComponent