YIUI3DDisplayChild.cs 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. using System;
  2. using System.Collections.Generic;
  3. using UnityEngine;
  4. using YIUIFramework;
  5. namespace ET.Client
  6. {
  7. /// <summary>
  8. /// 3DDisplay的扩展组件
  9. /// 文档: https://lib9kmxvq7k.feishu.cn/wiki/FhGGwVZSyiCqHCkTVQYcKHQCnKf
  10. /// </summary>
  11. [ChildOf]
  12. public partial class YIUI3DDisplayChild : Entity, IAwake<UI3DDisplay>, IDestroy, IYIUIEnable, IYIUIDisable, ILateUpdate
  13. {
  14. public UI3DDisplay m_UI3DDisplay;
  15. public UI3DDisplay UI3DDisplay
  16. {
  17. get
  18. {
  19. if (m_UI3DDisplay == null)
  20. {
  21. var objName = "";
  22. if (this.Parent.Parent is YIUIChild parent)
  23. {
  24. objName = parent.OwnerGameObject.name;
  25. }
  26. Log.Error($"{objName} m_UI3DDisplay == null 请检查");
  27. return null;
  28. }
  29. return m_UI3DDisplay;
  30. }
  31. }
  32. public Dictionary<string, GameObject> m_ObjPool = new();
  33. public Dictionary<GameObject, Dictionary<string, Camera>> m_CameraPool = new();
  34. }
  35. }