using System.Collections; using System.Collections.Generic; using UnityEngine; using ZXK.Framework; /******************************************************************************* *Create By CG *Function ¹¤¾ßÃæ°å¿ØÖÆ *******************************************************************************/ namespace ZXK.BYSS { public class ToolsPanel : UIBase { public void Init(string[] tools) { Transform toolItemParent = GetWedage("Content_N").transform; ToolItemPrefab toolItemPrefab = toolItemParent.GetComponentInChildren(true); for (int i = 0; i < tools.Length; i++) { GameObject toolitem = Instantiate(toolItemPrefab.gameObject, toolItemParent); toolitem.GetComponent().Init(tools[i]); toolitem.SetActive(true); } } } }