ResKitUIPanelTester.cs 888 B

123456789101112131415161718192021222324252627282930313233343536
  1. using System.Collections;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. namespace QFramework
  5. {
  6. public class ResKitUIPanelTester : MonoBehaviour
  7. {
  8. /// <summary>
  9. /// 页面的名字
  10. /// </summary>
  11. public string PanelName;
  12. /// <summary>
  13. /// 层级名字
  14. /// </summary>
  15. public UILevel Level;
  16. [SerializeField] private List<UIPanelTesterInfo> mOtherPanels;
  17. private void Awake()
  18. {
  19. ResKit.Init();
  20. }
  21. private IEnumerator Start()
  22. {
  23. yield return new WaitForSeconds(0.2f);
  24. UIKit.OpenPanel(PanelName, Level);
  25. mOtherPanels.ForEach(panelTesterInfo => { UIKit.OpenPanel(panelTesterInfo.PanelName, panelTesterInfo.Level); });
  26. }
  27. }
  28. }