using System.Collections; using System.Collections.Generic; using UnityEngine; using UnityEngine.UI; public class UISpoitsPanel : UIPanelBase { private Transform m_ContentName; private GameObject m_SpoitPrefab; private Toggle m_SpoitBtn; protected override void OnAwake() { base.OnAwake(); m_ContentName = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent"); m_SpoitPrefab = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent/SpoitBtn").gameObject; m_SpoitBtn = CacheTransform.Find("Scroll View (2)/Viewport/UISpoitContent/SpoitBtn").GetComponent(); } protected override void OnShow(object param) { base.OnShow(param); } public override void Hide() { base.Hide(); } public void SetSpoit(string SpoitName, bool state) { m_SpoitBtn.transform.Find("Text").GetComponent().text = SpoitName; m_SpoitBtn.gameObject.SetActive(state); } }