ShowTextWidgetData.cs 761 B

12345678910111213141516171819202122232425262728293031
  1. using Fort23.Core;
  2. using Fort23.UTool;
  3. using UnityEngine.UI;
  4. using UnityEngine;
  5. using System.Collections.Generic;
  6. using TMPro;
  7. namespace Fort23.Mono
  8. {
  9. public partial class ShowTextWidget
  10. {
  11. #region 自定义数据
  12. private TextMeshProUGUI _text;
  13. public TextMeshProUGUI text
  14. {
  15. get{
  16. if (_text == null)
  17. {
  18. _text = GetUIUnit<TextMeshProUGUI>("text");
  19. }
  20. return _text;
  21. }
  22. }
  23. #endregion 自定义数据结束
  24. public override async CTask SetUIGameObject(GameObject gObjectPoolInterface)
  25. {
  26. await base.SetUIGameObject(gObjectPoolInterface);
  27. Init();
  28. }
  29. }
  30. }