UIHelper.cs 535 B

123456789101112131415161718
  1. namespace ET.Client
  2. {
  3. public static class UIHelper
  4. {
  5. [EnableAccessEntiyChild]
  6. public static async ETTask<UI> Create(Entity scene, string uiType, UILayer uiLayer)
  7. {
  8. return await scene.GetComponent<UIComponent>().Create(uiType, uiLayer);
  9. }
  10. [EnableAccessEntiyChild]
  11. public static async ETTask Remove(Entity scene, string uiType)
  12. {
  13. scene.GetComponent<UIComponent>().Remove(uiType);
  14. await ETTask.CompletedTask;
  15. }
  16. }
  17. }